Use csrf_exempt for graphql/
urlpatterns = [
...
path("graphql/", csrf_exempt(GraphQLView.as_view(graphiql=True, schema=schema)), name='graphql'),
...
]
csrf_exempt will not work :-(
The reason (as I understant, it's may be wrong) is than django_injector adds wrapper to view GraphQLView and removes
.csrf_exempt = True
from view
Just for now I removed django_injector from project, because for me just injector works good with graphene-django
But may be it will be good to solve this issue.
Hi!
May be this info will save some time to users.
Issue description:
The reason (as I understant, it's may be wrong) is than django_injector adds wrapper to view GraphQLView and removes .csrf_exempt = True from view
Just for now I removed django_injector from project, because for me just injector works good with graphene-django But may be it will be good to solve this issue.