Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll interval or refetch on search GQL schema in GraphIQL #1161

Open
Tracked by #1358
Moumouls opened this issue May 4, 2022 · 3 comments
Open
Tracked by #1358

Poll interval or refetch on search GQL schema in GraphIQL #1161

Moumouls opened this issue May 4, 2022 · 3 comments
Milestone

Comments

@Moumouls
Copy link

Moumouls commented May 4, 2022

Is your feature request related to a problem? Please describe.

TLDR: this feature was supported on the Playground

The Schema seems to be fetched only once. But schema can change and evolve.

Describe the solution you'd like

Add an option to add a poll interval and/or trigger a introspection refetch when a user searches in the docs.

Describe alternatives you've considered

Reload the whole web page.

Additional context

@saihaj
Copy link
Collaborator

saihaj commented May 14, 2022

We could also add reload docs button similar to Altair

@Moumouls
Copy link
Author

@saihaj from my Playground knowledge you are right.

On the playground, if the "polling" option is not activated, the URL field display a reload button to let the user reload the schema without reloading the whole page.

@Urigo Urigo added this to the v3.x milestone Jul 6, 2022
@theguild-bot theguild-bot mentioned this issue Jul 6, 2022
This was referenced May 7, 2024
This was referenced May 23, 2024
@schettn
Copy link

schettn commented Sep 10, 2024

@Urigo

Any update on this? I need this feature at Pylon so that the playground updates while developing the schema.

On a second thought polling isn't optional for my use case. Is it possible to implement SSE?

Workflow:

  1. The GraphiQL listens for changes using SSE (e.g. /graphql/live)
  2. The server watches for changes (for example on the file location of the schema file, or just checks if the schema object changes)
  3. The server triggers a event
  4. The client re-introspects the schema.

This should only be a development feature and not be included in production.

Why not polling?

  1. I want instant feedback
  2. I do not want to spam my console with /graphql requests during development

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

No branches or pull requests

4 participants