Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

bug: GraphiQL Doc Explorer Loading State #12

Open
mtfoley opened this issue Jul 27, 2021 · 5 comments
Open

bug: GraphiQL Doc Explorer Loading State #12

mtfoley opened this issue Jul 27, 2021 · 5 comments

Comments

@mtfoley
Copy link
Contributor

mtfoley commented Jul 27, 2021

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

Schema loading based on introspection query takes a while and it says "No Schema Available" in the explorer window while loading.

Describe the solution you'd like

Would be nice if this could read differently, where it could have a loading state.

Describe alternatives you've considered

Additional context

Screenshot of current condition while loading schema:
Screen Shot 2021-07-26 at 10 30 33 PM

Based on looking through some of the graphiql repo, we may need to pass schema prop in a different way: https://github.com/graphql/graphiql/blob/5b3e8c3e807c9911491617bb00d8b31f95189ae9/packages/graphiql/src/components/DocExplorer.tsx#L81

@0-vortex
Copy link
Contributor

Adding this here for potentially easier resolution: the fetcher function takes care of placing schema property here - a working fix should be removing that line entirely and separating the GraphiQL fetcher from our config.fetchOneGraph - this could be potentially done in isolation, removing this fix bleeding into the other 2 issues reported, however closely linked IMO

@mtfoley mtfoley changed the title Feature: GraphiQL Doc Explorer Loading State bug: GraphiQL Doc Explorer Loading State Jul 28, 2021
@mtfoley
Copy link
Contributor Author

mtfoley commented Jul 29, 2021

So far just removing the line from Explorer component actually breaks things. Passing in undefined for initial schema doesn't help either. Though I'm seeing it in some of the source files like we linked above, looks like the spinner state doesn't make it into the node_modules/graphiql/dist or node_modules/graphiql/esm files somehow.

@0-vortex
Copy link
Contributor

So far just removing the line from Explorer component actually breaks things. Passing in undefined for initial schema doesn't help either. Though I'm seeing it in some of the source files like we linked above, looks like the spinner state doesn't make it into the node_modules/graphiql/dist or node_modules/graphiql/esm files somehow.

we need to stop polluting the schema property too unless we create our wrapper function - works for me locally, maybe you are seeing a different bug ?

@mtfoley
Copy link
Contributor Author

mtfoley commented Jul 30, 2021

Screenshots or it didn’t happen ;-) with dead ends I hit I tossed my changes so if you’ve got a fix 🚢

@0-vortex
Copy link
Contributor

just went to the version before we adjusted the schema, removed the schema prop entirely AND left the default fetcher. That is the most basic example of GraphiQL with just the fetcher added - can't not not work if you get what I mean :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants