graphene-django
graphene-django copied to clipboard
Delay assignment of csrftoken in Graphiql
The csrftoken is currently assigned only when graphiql.js is first loaded.
The current csrftoken can rotated by Django, for instance when a user logs in. rotate_token performs the rotation.
When this happens, the csrftoken held by graphiql.js is invalid and Graphiql will receive CSRF errors.
This PR delays the assignment of the csrftoken by moving it into the httpClient function so when the csrftoken is rotated by Django, Graphiql can pick up the new token from the cookies.
@keithhackbarth Do you happen to know what I should do to merge this PR? I'm not authorized to do so and the build status is still in orange.
Ran into this issue, would be great if this can be merged and included in a future release!