-
Notifications
You must be signed in to change notification settings - Fork 566
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
Unable to get session cookies to work #156
Comments
This definitely seems odd. Would be great to further look into this and ideally write a test for this. |
I'll try to give a closer look during the week. |
@giacomorebonato hey, bro. did you fix your problem? and how? |
Hey, @schickling repo with my project |
@alexneo2003 I had the same issue from looking at that auth example, I didn't notice these lines essentially renaming
So, instead of renaming it, I did something similar like this:
|
I have same problem. When I query, I can't get user in session. I also try JWT and it is the same. Does anyone have solution for this problem? |
Unfortunately it appears that Playground does not send cookies by default to the server. Setting cookies is fine, but sending them back in requests is not enabled by default because it relies on the server having cors configured properly. See this issue graphql/graphql-playground#470. I'm not sure how to go about enabling that feature, but I've just accepted that my code works despite things not working in Playground. My tests pass, and other people have the same issue, so I'm content. I hope you all have found peace with this rather annoying feature/bug. I've heard that GraphiQL works fine for a situation like this, but can't confirm it. |
Due to inactivity of this issue we have marked it |
Hey 👋, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of |
I solved this problem in the
Next, when you initialize the server, you can get the
An example can be found here https://github.com/bakhaa/pw/blob/master/api/app.js. |
I am trying to save some session data inside of a mutation.
This is how I set the middleware and how I pass the session to the context.
I successfully add values to the session object... but later on they are not present on the next requests (I am using the playground).
Is it a problem with my middleware configuration or something more?
In a plain Express JS app this configurations is working correctly.
The text was updated successfully, but these errors were encountered: