Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readonly & internal custom fields #216

Closed
michaelbromley opened this issue Nov 26, 2019 · 0 comments
Closed

Readonly & internal custom fields #216

michaelbromley opened this issue Nov 26, 2019 · 0 comments

Comments

@michaelbromley
Copy link
Member

Is your feature request related to a problem? Please describe.
Sometimes you want to define a CustomField which is only used for internal business logic, and should not be exposed by the GraphQL API. Other times you want a CustomField which is exposed, but cannot be modified through the GraphQL API (only by means of direct manipulation i.e. in the code of a Plugin).

Describe the solution you'd like
There should be 2 additional options available on all CustomField types:

  • readonly: boolean: This field will be exposed via the GraphQL APIs but will not extend the related input types.
  • internal: boolean: This field will not be exposed at all via the GraphQL APIs.

In the Admin UI app, readonly fields will be displayed as a read-only control, whereas internal fields will not be shown at all.

michaelbromley added a commit that referenced this issue Dec 3, 2019
Also intercepts mutations to remove any readonly custom fields from the input object, which would otherwise cause throw a server error. Relates to #216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant