You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2024. It is now read-only.
It seems that if I enable Laravel passport on my graphql endpoint I can not get GraphiQL to work, even if I add the 'X-Requested-With' => 'XMLHttpRequest' header to the request it uses. Based on my research I found that it is not sending the X-CSRF-TOKEN or the 'X-XSRF-TOKEN' which all other javascript based queries do when working with passport.
And it is also missing the laravel_token cookie as well.
Is their any fix for this?
The text was updated successfully, but these errors were encountered:
Update for anyone who has this issue in the future:
In the graphiql.php config add: 'X-Requested-With' => 'XMLHttpRequest', to the headers array.
Then in the resources/views/vendors/graphiql/index.blade.php section add 'X-CSRF-TOKEN': '{{ csrf_token() }}', to the fetch function after the @endforelse
It seems that if I enable Laravel passport on my graphql endpoint I can not get GraphiQL to work, even if I add the
'X-Requested-With' => 'XMLHttpRequest'
header to the request it uses. Based on my research I found that it is not sending theX-CSRF-TOKEN
or the 'X-XSRF-TOKEN' which all other javascript based queries do when working with passport.And it is also missing the laravel_token cookie as well.
Is their any fix for this?
The text was updated successfully, but these errors were encountered: