Feature request: way to require only_fields
See original GitHub issueThere doesn’t seem to be a way to enforce only_fields
on DjangoObjectType
s. This is a serious security issue, since fields all default to accessible, including Django’s automatically created reverse relation fields.
I tried to introspect this value, but it gets erased at class creation time. We only end up with MyType._meta.fields
, which is a value computed from several inputs including only_fields
. Possible solutions:
- Copy
only_fields
onto_meta
- Don’t delete the
Meta
attribute from the class inSubclassWithMeta
- Official support for requiring
only_fields
, in the form of a configuration setting
Related: #516
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Feature Request: Apply styles to read-only fields - ServiceNow
Solved: I was recently informed by Now Support that UI styles cannot be applied to read-only fields, and for this 7-year-old known issue, ......
Read more >How to handle "can you add just a few more fields" type of ...
Very commonly we have feature requests for fields that only one customer wants. This, at best, clutters the application's code. Often when we...
Read more >Feature Requests: What are they and how to manage them
Feature requests are a form of product feedback you may frequently encounter as a SaaS product manager. They typically come in the form...
Read more >How To Manage Feature Requests [Template included]
This guide will teach you everything about feature requests – how to process them, manage them, respond to them, prioritize them – so...
Read more >Read only ticket field for agents - Zendesk help
I would assume that a read only field for agents would need a method to ... PLEASE HONOR THIS FEATURE REQUEST. this is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@reverie https://github.com/graphql-python/graphene/pull/1007
Also your code above can be a bit cleaner by using the typemap from the schema directly (when the above PR has been merged):
Right I get you now. I’m not 100% sure why the Meta class gets deleted either to be honest. I’ll raise a PR in the Graphene repo and see if it gets anywhere.