Skip to content

Sharing data with express-session #7485

Answered by jcubic
jcubic asked this question in Q&A
Discussion options

You must be logged in to vote

Ok I've foud the issue by debugging the express-session. I've found that on each request new session was created because cookie was missing in the request.

Found this SO question: GraphQL playground - sending Cookie as Http Header "disappears", the problem was that in playground there was a setting:

{
  ...
  "request.credentials": "omit",
  ...
}

Changing it to:

{
  ...
  "request.credentials": "include",
  ...
}

and saving the settings solved the issue.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jcubic
Comment options

You must be logged in to vote
1 reply
@jcubic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants