-
Notifications
You must be signed in to change notification settings - Fork 23
Cache parsed queries by default #2
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
Conversation
Thanks for submitting. Let's wait on @syrusakbary to review and resolve your referenced PR than we can move forward here. Two next steps that will be required are to write a test for I imagine something as simple as moving Otherwise, if you want to break out the first commit for the GraphiQL update, those are more easily accepted. Again, thanks for the submission! |
@syrusakbary @dfee I'm starting to use graphql-env with aiohttp (the server is a stripped down version of aiohttp-graphql that relies on a Django-like view, configured by storing the GraphQLEnvironment in the aiohttp app object) and a custom caching and logging backend. It's a real improvement in clarity compared to my previous setup but I understand graphql-env is under development. Should I look into making it live in graphql-env/server alongside the flask integration? Or should I wait for the project to mature a bit? |
GraphQL-env is completely safe to use in a production environment, and is the next step of proper execution of GraphQL queries. The end goal is moving almost all the GraphQL server implementations (Django view, Flask, aiohttp) to use GraphQL-env under the hood. |
Sorry I didn't answer your reply: if you can create a PR into GraphQL env that would be great, it will help to integrate GraphQL-Env into this repo later :) |
Ok, I'll start work on moving my aiohttp based server into graphql-env. I'll have two smaller PRs though (putting this here partially as a note to self):
|
This would need support in GraphQL server core, as per the following PR:
graphql-python/graphql-server#7
For simple queries, the main performance issue is the parsing stage, and people usually end up rewriting graphql-server-core (and aiohttp-graphql for people using it) to allow caching, logging etc.
Enabling configurable caching by default in aiohttp-graphql may be useful.