-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Adding Directives to Schemas #105
Comments
If i understood you correct, you want to cache queries made to db? For external or other queries see facebooks DataLoader: |
We want to put a CDN infront of our service to help scale it under load. The Dataloader only helps with the calls to Mongo. A CDN will cache the request/response so it serves from the edge vs the origin servers. |
That is not implemented in graphql-compose. In our environment, we use serverless for automatic AWS deployment and run everything in lambda as it is autoscaling and you only pay pr runtime as it is really cheap |
One can imagine other use cases. For example, the schema directive that brought me here is https://github.com/confuser/graphql-constraint-directive. Others might want to create custom schema directives for their own servers (e.g. via https://www.apollographql.com/docs/graphql-tools/schema-directives.html). But there doesn't seem to be any documented or undocumented way of adding these to types unless I'm missing it? |
Adding directives via It will be good if you write about your needs and use cases in the 1262 issue. Right now there is no way to add directives via |
Thanks. I understand, and after exploring the topic some more, it looks to me like @19majkel94 did a good job making the same case I might have in graphql/graphql-js#1343 It also looks like a related topic was discussed at a WG meeting a few months back: https://github.com/graphql/graphql-wg/blob/master/notes/2018-02-01.md#exposing-schema-metadata. Maybe some progress will be made soon. |
Hey All-
We are looking to use the new ApolloServer 2.0 features around CDN integration for some of our services-
https://www.apollographql.com/docs/apollo-server/v2/features/cdn.html
Any suggestions around how to get the directives added to some of the types output by graphql-compose-mongoose?
The text was updated successfully, but these errors were encountered: