Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Integrate GraphiQL Explorer into devtools #199
There are a few bugs that come from my confusion around this, but as a proof of concept it works perfectly fine. Mainly, the explorer won't get the schema until GraphiQL has loaded it up and there's been one state-invalidating thing to happen (e.g. typing in the query or clicking a button). If there's an easy way to get the schema in this component, it'd be a trivial swap.
The other concern is getting the current query text from the GraphiQL instance into the explorer - right now I store it in the state, but it could just as easily pull it from the editor state, just like the
Finally, I introduced a
@jbaxleyiii Would be great to know what needs to change to actually get this to the right quality level and merged in!
I've fixed up the hack and the sync issues by moving the schema fetch up outside of GraphiQL and into Explorer.js, it's pretty smooth now.
There's a small visual glitch with the
changed the title
Proof-of-concept of the GraphiQL Explorer integrated into devtools
Apr 30, 2019
We just released a new version ~10 minutes ago
Updating should be pretty simple, just bump to the
And live in https://github.com/apollographql/apollo-client-devtools/releases/tag/v2.2.3. Thanks @sgrove!