It looks like stock relay networklayer does'nt send a cookie header field with his request. So I tried to add it by adding Cookie field like this:
Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('/graphql', {
headers: {
'Cookie': 'user=thibaut',
},
})
);
but still the Cookie field is not present in my post request. If I replace 'Cookie' with 'Set-Cookie', IT IS in my post request...
I need my server to use cookies please help ! :)
Set your cookies in the usual way (using browser APIs) then configure fetch as follows to have them sent along with each request:
Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('/graphql', {
credentials: 'same-origin',
})
);