Skip to content

Curl button does not work in HTML page: TypeError: t.context.store is undefined #1219

@olivierlemasle

Description

@olivierlemasle

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?

Fedora 32, with:

  • Firefox 76
  • Chrome 83

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

Latest version from //cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js so probably 1.7.23.

What is the expected behavior?

Clicking on "COPY CURL" should copy (I guess) the cURL for the GraphQL request.

What is the actual behavior?

Nothing happens. An error is printed on console:

TypeError: t.context.store is undefined

image

What steps may we take to reproduce the behavior?

  1. Download the minimal HTML page provided by Playground
  2. Run a simple server with this single page (e.g. using serve: serve . if minimal.html is downloaded in current directory)
  3. Access to the web page (e.g. http://localhost:5000/minimal.html)
  4. Specify a GraphQL endpoint (e.g. https://countries.trevorblades.com/) and a query (e.g. {continents{name}}).
  5. Click on "COPY CURL"
  6. Check that the cURL command has not been copied, and the console contains the error shown above.

Note that I've seen the error with both Firefox and Chrome.
I've also reproduced the error with the "full loading animation".

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