We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With Django and Graphene users can do the following to exempt the graphql endpoint from CSRF authentication.
urlpatterns = [ path("admin/", admin.site.urls), path("graphql", csrf_exempt(GraphQLView.as_view(graphiql=True, schema=schema))), ]
How can one do this with Flask-GraphQL?
app.add_url_rule( '/graphql', view_func=GraphQLView.as_view( 'graphql', schema=schema, graphiql=True ) )```
The text was updated successfully, but these errors were encountered:
Not quite a solution as elegant as what Django has but here is what I did.
I created a Blueprint just for my GraphQL API and exempted the whole blueprint from CSRF.
api.add_url_rule( '/graphql', view_func=GraphQLView.as_view( 'graphql', schema=schema, graphiql=True ) ) csrf.exempt(api)
Sorry, something went wrong.
No branches or pull requests
With Django and Graphene users can do the following to exempt the graphql endpoint from CSRF authentication.
How can one do this with Flask-GraphQL?
The text was updated successfully, but these errors were encountered: