Skip to content

request.credentials configuration is ignored #791

@gajus

Description

@gajus

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions