Graphql-playground: Query results disappear after a second or so

Created on 27 Jan 2019  路  10Comments  路  Source: graphql/graphql-playground

This issue pertains to the following package(s):

  • [ ] GraphQL Playground - Electron App
  • [x] 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?

macOS Mojave 10.14.2

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

Middleware. I'm using the "As HTML Page" method form the README to embed the playground inside an existing server.

What is the expected behavior?

When running a query, results should be displayed on the right pane

What is the actual behavior?

Results are displayed but they disappear after a second or so (making the playground unusable). Looking in the network logs, it looks like a schema introspection query is made every few seconds, which wasn't the case previously

What steps may we take to reproduce the behavior?

Follow the "As HTML Page" instructions from the readme, and try running any query.

As a workaround, I temporarily changed the middleware script URL to use version 1.7.11:
//cdn.jsdelivr.net/npm/[email protected]/build/static/js/middleware.js

That fixed the issue for me.

bu0-needs-info

Most helpful comment

Happened to me as well, but turning polling off (Settings -> schema.enablePolling) fixed it.

All 10 comments

@martinraison Thanks for reporting that, do you have the same problem with the latest version? Or on what version did you encounter that?

@Huvik I believe it was version 1.7.15

I just tried to reproduce it, but no luck can you describe more in details how to reproduce it?

Thanks for looking into it! I tried to reproduce with a small express-graphql app but couldn't. My original server is using graphql-java. I noticed that if I disable introspection queries server side, the issue disappears. There may be something in the introspection query result that causes the issue. I'll try to create a minimal graphql-java repro if I can find some time

I've noticed this issue as well (same integration, via the 'As HTML page' instructions).

Not sure if it helps or not, but (similar to what @martinraison mentioned) I noticed in Chrome Dev Tools the introspection query runs every few seconds, and _I think_ the results get cleared around the same time, so I sorta wonder if it's related.

Using @1.7.11 in the CDN URLs also fixed the bug for me. (Issue was present in both 1.7.17 and 1.7.15 of grapql-playground-react for me)


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

  • macOS 10.14 Mojave
  • Chrome 71.0

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

  • 1.7.17 and 1.7.15 of grapql-playground-react
  • integrated into project via the 'As HTML page' instructions

Upon further investigation, I wonder if it only happens when running my app locally. I was unable to reproduce the issue when it was deployed.

I tried fiddling around with the Network Link Conditioner to see if it might be a timing issue or something, but unfortunately didn't find anything.

Not sure if it helps, but I'm using Absinthe on the backend

I think it has something to do with new schema pooling feature. I was able to reproduce that, but only when there is returned an error.

Happens in the standalone app as well (Version 1.8.7 (1.8.7)). Rest of the details appears to be the same for me (macOS 10.14, Chrome 71, local install). I see the results show up, and then they clear out. Happening on a new query, existing queries are still showing.

Actually I am seeing it on remote connections as well

Happened to me as well, but turning polling off (Settings -> schema.enablePolling) fixed it.

Was this page helpful?
0 / 5 - 0 ratings