Skip to content

Add the ability to use a custom backend. #9

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

Closed
wants to merge 1 commit into from

Conversation

dkruk
Copy link

@dkruk dkruk commented Dec 23, 2018

From my point of view, the backend is a good place to add some protection(e.g. query depth or complexity). In the custom backend it possible to analyze document AST and raise an exception, if the query does not comply with the rules before it will be executed.

graphql_server.execute_graphql_request accepts the parameter backend and if it None get default backend.

@wumpus
Copy link

wumpus commented Jan 8, 2019

Apparently a custom backend is also the preferred way to add caching of parsed queries, as per graphql-python/graphql-server#7 (see also #2)

Since the desire to have cached parsing is popular, it would be nice to have a worked-out example of how to do that in our docs.

@Cito Cito force-pushed the master branch 2 times, most recently from 6a8d7be to 21a6753 Compare January 24, 2020 16:56
@Cito
Copy link
Member

Cito commented Jan 24, 2020

Thank you. This should be possible with #10 already.

@Cito Cito closed this Jan 24, 2020
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

Successfully merging this pull request may close these issues.

3 participants