-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Session cookie is not passed #437
Comments
The default network layer uses Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('http://example.com/graphql', {
credentials: 'same-origin',
})
); |
Great ! Reading the documentation for injecting a network layer, it is not clear to me where this should be done. Just before declaring the RootContainer ? I am using react-router-relay so I wonder if I have control over the network layer or if I should look inside react-router-relay. |
@benoitguigal It shouldn't matter as long as you do it before rendering your app with |
Works like a charm, thanks a lot ! |
@benoitguigal Can you give me an example how you pass the connect.sid to the requests? I am at the same point and don't know how to set the cookie. |
@dasarma, just add:
an then cookies will be passed.
|
I am using Relay with express-graphql and express-session. I would like to use the session in my GraphQL schema but unfortunately the
connect.sid
cookie is not passed in graphql requests.Should I create my own network layer for that or is this supposed to be built-in ?
The text was updated successfully, but these errors were encountered: