Skip to content

Conversation

punitsu
Copy link
Contributor

@punitsu punitsu commented Mar 26, 2025

Description

Recently #3604 added the GraphiQLPluginExplorer

When using the GraphQL Playground handler, if the WithGraphiqlEnablePluginExplorer(true) option is not explicitly passed, the plugin explorer script (@graphiql/plugin-explorer) is not included in the rendered HTML. However, the JavaScript code in the template still references GraphiQLPluginExplorer, leading to the following error in the browser console:

Uncaught ReferenceError: GraphiQLPluginExplorer is not defined
    at <anonymous>:113

Steps to Reproduce

  1. Set up the GraphQL Playground handler without enabling the plugin explorer:
    h := playground.Handler("GraphQL Playground", "/graphql/query")
  2. Open the playground in the browser.
  3. Check the console for the GraphiQLPluginExplorer is not defined error.

Resolves #3619

@coveralls
Copy link

Coverage Status

coverage: 73.354%. first build
when pulling 2651e61 on punitsu:master
into 4b2076c on 99designs:master.

@StevenACoffman StevenACoffman merged commit fdeaef0 into 99designs:master Mar 26, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphiQLPluginExplorer is not defined when Plugin Explorer is not explicitly enabled in playground
3 participants