question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

request.credentials configuration is ignored

See original GitHub issue

This issue pertains to the following package(s):

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

Setup:

app.use('/', expressPlayground({
  endpoint: '/',
  settings: {
    'request.credentials': 'include'
  }
}));

The generated code confirms that the option is being passed:

GraphQLPlayground.init(root, {
  "endpoint": "/",
  "settings": {
    "request.credentials": "include"
  },
  "version": "1.7.2",
  "canSaveConfig": false
})

However, viewing the configuration in the application (browser) shows that the setting did not have effect:

{
  "general.betaUpdates": false,
  "editor.cursorShape": "line",
  "editor.fontSize": 14,
  "editor.fontFamily": "'Source Code Pro', 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace",
  "editor.theme": "dark",
  "editor.reuseHeaders": true,
  "prettier.printWidth": 80,
  "request.credentials": "omit",
  "tracing.hideTracingResponse": true
}

I have tried reseting the local storage values with no effect.

Changing the configuration using the application itself makes it work as expected for that local session.

The issue appears to be that GraphQLPlayground.init ignores request.credentials setting.

Related issues:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:24
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

14reactions
cyberdudecommented, Aug 29, 2018

Why is the default setting omit?!

2reactions
boennemanncommented, Oct 31, 2018

I’m still running into the very same issue and it seems this was only fixed for graphql-playground-react, while graphql-playground-html has the same issue.

Running this via apollo-server-koa @ 2.1.0, which requires @apollographql/graphql-playground-html @ ^1.6.0, which resolves to 1.6.4 and I’m seeing the exact same behavior of ignored settings.

Would appreciate some help here. If you need any more pointers please let me know 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access-Control-Allow-Credentials - HTTP - MDN Web Docs
When a request's credentials mode ( Request.credentials ) is ... the response is ignored by the browser and not returned to the web...
Read more >
CORS: credentials mode is 'include' - Stack Overflow
When withCredentials is set to true, it is trying to send credentials or cookies along with the request. As that means another origin...
Read more >
Configure the EB CLI - AWS Elastic Beanstalk
You can tell the EB CLI to ignore certain files in your project directory by adding the file .ebignore to the directory. This...
Read more >
config - Go Packages
All environment values are optional. But some values such as credentials require multiple values to be complete or the values will be ignored....
Read more >
Microsoft Edge Browser Policy Documentation
WAMAuthBelowWin10RS3Enabled, WAM for authentication below Windows 10 ... Ignore Application Guard site list configuration and browse Edge ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found