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

Enable leveler on the schema level #1

Open
e0ipso opened this issue Nov 3, 2017 · 1 comment
Open

Enable leveler on the schema level #1

e0ipso opened this issue Nov 3, 2017 · 1 comment

Comments

@e0ipso
Copy link

e0ipso commented Nov 3, 2017

Thanks for this Peter!

Right now the process of enabling leveler in a graphql schema is a bit involved. It would be great to have a way to enable leveler for all GraphQLObjectType in a given schema or high level type.

This will be hard in situations where part of the schema is provided externally and the source cannot be modified easily. With the current process you have to be very careful not to forget to use GraphQLObjectType, if you do there is no way to detect that easily.

It would be great something like:

enableLeveler(schema: GraphQLSchema) {
  // Traverse the schema recursively and decorate `GraphQLObjectType` with leveler features.
}
@chasingmaxwell
Copy link
Owner

That's a great idea! I could see some cases where you would want to only provide leveler features on specific object types, but in cases where you do want to convert all object types to leveler types this would be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants