Open KrishyV opened 4 years ago
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)
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?