Open zhaogaolong opened 5 years ago
Don't know if it helps, it helped me. Try checking this
'request.credentials': 'omit', // possible values: 'omit', 'include', 'same-origin'
I set it to include and it started working after calling login mutation
Apparantly adding the HTTP-HEADER is swallowed, even with request.credentials
set to incude
. Setting the cookie from the dev tools also doesn't seem to work. Executing document.cookie = "a=4"
doesn't set the cookie in the application view.
Any other workarounds on how to inject cookies?
Using the desktop app, version 1.7.20
Hmm. Apparantly I'm using 1.8.10, but the lower right corner in the settings view shows 1.7.20. How is this possible?
Using the desktop app, version 1.7.20
Same problem for me 1.7.20 in corner (1.8.10 in CMD+,)
"editor.cursorShape": "line",
"editor.fontFamily": "'Source Code Pro', 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace",
"editor.fontSize": 14,
"editor.reuseHeaders": true,
"editor.theme": "dark",
"general.betaUpdates": false,
"prettier.printWidth": 80,
"prettier.tabWidth": 2,
"prettier.useTabs": false,
"request.credentials": "include",
"schema.disableComments": true,
"schema.polling.enable": true,
"schema.polling.endpointFilter": "*localhost*",
"schema.polling.interval": 200000,
"tracing.hideTracingResponse": true
}```
@andylacko's solution works for me on 1.7.23 in Chrome.
I had to reload the page to make it work.
I have this problem too. can't add cookie to http headers. also when i examine the headers in browser, noticed that Content-Type sent in lowercase like "content-type". and when i open settings, it shows version 1.7.20 in right bottom corner. my version: 1.8.10 please fix these problems. thanks
If you're here because you're attempting to authenticate to access services by spoofing cookies, consider instead using the Authorize header in the HTTP HEADERS section of the Playground as explained here for Reaction Commerce (as an example):
Nothing worked for me either. Had to switch GraphQL Playground to Insomnia Core, no such problems there.
I had to use GraphiQL. It allows to add cookies easily
How can I do this using the GraphQL Playground desktop app?
This issue pertains to the following package(s):
What OS and OS version are you experiencing the issue(s) on?
mac os 10.14.6
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
verssion 1.8.10 (1.8.10.5129)
how add cookies in request.