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

Can I customize the visibility of parts of the schema? #405

Closed
yaquawa opened this issue Nov 24, 2018 · 2 comments
Closed

Can I customize the visibility of parts of the schema? #405

yaquawa opened this issue Nov 24, 2018 · 2 comments

Comments

@yaquawa
Copy link

yaquawa commented Nov 24, 2018

Hi!
I want to know can I customize the visibility of parts of the schema with graphql-php? just like how the graphql-ruby deals with the visibility of schema.

I have a project with 3 types of account (admin,client,user), currently, all of the schema mixed together, I want to separate the schema by the account type.

with this we can:

  1. skip unnecessary parsing
  2. skip unnecessary authorization logic
  3. better security (especially, in terms of introspection)

currently, to achieve 2 and 3 I have to write the check logic manually, which can be a big pain when the project get bigger and bigger.

@vladar
Copy link
Member

vladar commented Nov 27, 2018

This is a nice feature, but it is not supported in this library. There is a related issue in the reference implementation: graphql/graphql-js#113

I think we'll wait until it is resolved there. Feel free to re-open when it happens.

@sebastienbarre
Copy link

@yaquawa I'd love to know how you implemented this feature, I need to skip fields as well based on the user.

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

3 participants