question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Start warning if `fields` or `exclude` are not defined on `DjangoObjectType`

See original GitHub issue

So that model fields aren’t accidentally exposed through DjangoObjectType I propose that we start warning if either fields or exclude aren’t defined with the intention to error completely in the future. This would also align the API more with Django Rest Framework which hopefully makes it more familiar to most developers.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
radekwlskcommented, Jun 6, 2020

@radekwlsk if you have the time that would be great! I don’t think anyone is working on it at the moment.

Great. I will start working on it tomorrow. You can assign me to the issue, @jkimbo .

1reaction
jkimbocommented, Jun 6, 2020

@radekwlsk if you have the time that would be great! I don’t think anyone is working on it at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

graphene-django: 'Meta.model' without either 'Meta.fields' or ...
Specify the filter_fields attribute in the PatientType.Meta as class PatientType(DjangoObjectType): class Meta: model = Patients exclude ...
Read more >
Graphene Documentation - Read the Docs
Setting neither fields nor exclude is deprecated and will raise a warning, you should at least explicitly make. DjangoObjectType include all ...
Read more >
Queries & ObjectTypes - Graphene-Python
DjangoObjectType will present all fields on a Model through GraphQL. If you only want a subset of fields to be present, you can...
Read more >
field_name - django-filter - Read the Docs
The name of the model field that is filtered against. If this argument is not provided, it defaults the filter's attribute name on...
Read more >
Developing Apps - Nautobot Documentation
This documentation covers the development of custom apps (plugins) for Nautobot. ... Use a Development Environment, Not Production For App Development.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found