Skip to content

GraphiQLPluginExplorer is not defined when Plugin Explorer is not explicitly enabled in playground #3619

@punitsu

Description

@punitsu

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.

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