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.

RenderPageOptions.settings 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

What OS and OS version are you experiencing the issue(s) on?

OSX

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

1.7.0

What is the expected behavior?

When providing RenderPageOptions.settings the page should open with those effective, instead of the default values.

    const options: RenderPageOptions = {
      endpoint: url,
      settings: {
        'general.betaUpdates': false,
        'editor.fontSize': 12,
        'editor.fontFamily': "'Menlo', 'Source Code Pro', 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace'",
        'editor.theme': 'light',
        'editor.reuseHeaders': true,
        'request.credentials': 'omit',
        'tracing.hideTracingResponse': true,
      },
      version: playgroundVersion,
    };
    return renderPlaygroundPage(options);

What is the actual behavior?

The “settings” are ignored, the page always renders with the default settings, the served HTML actually contains the settings given in code. Tested with Chrome incognito window, not a browser caching issue. Once the page opens it is possible to changes the settings in browser.

What steps may we take to reproduce the behavior?

Just try to provide any settings to the renderPlaygroundPage or any of the middleware packages.

Please provide a gif or image of the issue for a quicker response/fix.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

5reactions
danlannzcommented, Jul 2, 2018

it looks to be writing the settings to the DOM prior to client initialisation but is failing to hydrate the redux store settings from props

https://github.com/prismagraphql/graphql-playground/blob/62ecfdb658935a11391701835d15c66a06be68ad/packages/graphql-playground-react/src/components/GraphQLBinApp.tsx#L42-L51

1reaction
omgriefcommented, Sep 29, 2018

seeing this issue as well when configuring through apollo 2, would like to see this fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

RenderPageOptions.settings is ignored · Issue #741 - GitHub
When providing RenderPageOptions.settings the page should open with those effective, instead of the default values. const options: ...
Read more >
Settings in .editorconfig are ignored or get overridden
It seems to me that IntelliSense is not respecting the .editorconfig anymore. I use the NuGet package StyleCop.Analyzers and Microsoft.CodeAnalysis.
Read more >
CORS settings are ignored - node.js - Stack Overflow
Turns out the problem was with passing cors configuration to apollo-server-express because app.use(cors(corsOptions)) does really nothing ...
Read more >
Renovate Bot Package Diff
the `playground` and `introspection` options must be set explicitly to `true`. ... RenderPageOptions as PlaygroundRenderPageOptions,.
Read more >
Fork of Meteor Spide jazeee-meteor-spiderable - 996station
... spiderable-longer-timeout About package Installation Setup Render page Options Set up bot`s user agents Cache lifetime (TTL) Set ignored ...
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