Fixed GraphQL Playground with custom configuration in production.#1495
Merged
evans merged 7 commits intoapollographql:masterfrom Aug 14, 2018
Merged
Fixed GraphQL Playground with custom configuration in production.#1495evans merged 7 commits intoapollographql:masterfrom
evans merged 7 commits intoapollographql:masterfrom
Conversation
|
@nderscore: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Contributor
Author
|
Edit: Tests seem to be passing now. |
…duction environments. * Updated logic in `createPlaygroundOptions` to cast the `playground` option to a boolean if it is defined. Fall back to `isDev` logic only if undefined. * Updated unit test for partial graphql playground options to emulate a 'production' environment, mimicking the scenario that was broken before.
8764fef to
ab18feb
Compare
abernix
approved these changes
Aug 14, 2018
hwillson
approved these changes
Aug 14, 2018
Contributor
|
@nderscore Thank you so much! We'll get this out asap |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes issue #1386. Many thanks to @thinkjson for investigating and raising this issue, as well as the proposed solution.
This is an alternative to PR #1417. While that PR seeked to solve the issue by altering the playground configuration object to add a new option for enabling/disabling playground, this solution is more aligned with the existing configuration and (my) expectations about how it should behave.
Fixed support for GraphQL Playground with custom configuration in production environments.
createPlaygroundOptionsto cast theplaygroundoption to a booleanif it is defined. Fall back to
isDevlogic only if undefined.environment, mimicking the scenario that was broken before.
TODO: