Graphql-playground: Cookies are not sent

Created on 2 May 2018  路  14Comments  路  Source: graphql/graphql-playground

This issue pertains to the following package(s):

  • [ ] GraphQL Playground - Electron App
  • [x] GraphQL Playground HTML
  • [ ] GraphQL Playground
  • [x] GraphQL Playground Express Middleware
  • [ ] GraphQL Playground Hapi Middleware
  • [ ] GraphQL Playground Koa Middleware
  • [ ] GraphQL Playground Lambda Middleware

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.6.1

What is the expected behavior?

When I set request.credentials: include in settings, cookies should be sent

What is the actual behavior?

Cookies are not sent.

When I downgrade to [email protected] everything works just fine.

Most helpful comment

@michalkvasnicak it didn't help. Request doesn't include cookies.

All 14 comments

same here. the latest version doesn't send cookies, settings are ignored. 1.4.9 works fine.

I've got same problem with latest version of graphql-playground-middleware-express.

I am using graphql-playground-middleware-koa and I have the same issue. @michalkvasnicak how do you pass the request.credentials: include settings to the middleware?
Also wouldn't it make sense to send all cookies by default?

@capaj the middleware is responsible for rendering GraphQL Playground, so I just set request.credentials to include in the settings of GraphQL Playground (in browser).

@michalkvasnicak it didn't help. Request doesn't include cookies.

@rocknrolla777 yeah I know, I just answered the question of @capaj. We need to wait until the new version is released.

Fixed in the latest version. Please let us know if you still have that issue, then we reopen it!

I use 1.7.2 version.but it not woks after set "request.credentials": "include"

I have the same issue here with 1.7.2. Any solution yet?

npm install graphql-playground-html@latest -> 1.6.13
npm install graphql-playground@latest -> 1.3.17

The latest graphql-playground here at GitHub is 1.8.10

Which version is the latest? 1.8.10? Why the one at NPM is so much older?
A reasonable expectation would be to see all three versions being equal.
No idea what's going on here 馃槰

馃憤 I have same issue - setting a "Cookie" in the header and the request.credentials to "include" does not send the cookie

Hi @maxwellsmart84, did you use Set-Cookie header in response to set cookie in your browser?

@yoshiakis I have my settings like so:

Screen Shot 2019-06-10 at 11 04 13 AM
Screen Shot 2019-06-10 at 11 04 06 AM

Am I missing a setting?

@maxwellsmart84 You can't set cookie from the HTTP HEADERS panel. You need to receive Set-Cookie header from a server in advance to set cookie. It is also possible to set cookie using browser's Dev tools.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tlvenn picture tlvenn  路  15Comments

anodynos picture anodynos  路  19Comments

tuurbo picture tuurbo  路  13Comments

jazzzz picture jazzzz  路  38Comments

nicolas-besnard picture nicolas-besnard  路  22Comments