-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
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
How to set the headers for the batch plugin #166
Comments
It should work fine but you need to make sure the batch plugin is applied last. The order of plugins is important here. I don't have enough information here, can you post some code samples? |
I'm working with Laravel sanctums session cookies.
My client I created looks like this:
This works just fine but when i'm using the batch plugin like this:
My API returns a 419 no reason phase. |
I did however find out that in the request headers with the 1st setup a Cookie: XSRF-TOKEN gets send while with the batch plugin this doesn't happen. Request headers:
With batch:
|
From what I can see in your example responses. The I have a similar setup with a Rails server and it's working as expected. Is your server capable of handling batched queries? If it is possible to set up a simple Laravel repo to test this issue that would be great, otherwise it will be guesswork on my part. |
It should be according to Lighthouse-PHP. I'll set up a simple laravel repo tomorrow to see if it is a problem in my current configuration. |
I can confirm that with adding the |
Hi!
First of all, amazing GraphQL client!
There is however one thing I can't seem to figure out.
I was wondering how I should set the headers for the batch plugin.
Without the batch plugin I made an auth plugin as stated in the docs and this works fine until I add the batch plugin to the mix.
I need to set the credentials to
include
as well as set anX-XSRF-TOKEN
header.if I add the batch plugin the requests all return a
419 No reason phase
as theX-XSRF-TOKEN
header doesn't get set.How should I do that?
The text was updated successfully, but these errors were encountered: