graphql / graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
MIT License
15.9k stars 1.7k forks source link

Proposal: GraphQL Voyager plugin #1533

Open FluorescentHallucinogen opened 4 years ago

FluorescentHallucinogen commented 4 years ago

I'm interested in creating GraphQL Voyager plug-in for GraphiQL.

FluorescentHallucinogen commented 4 years ago

@acao @IvanGoncharov @RomanHotsiy cc.

acao commented 4 years ago

this is something @IvanGoncharov himself (one of the original voyager authors) proposed and is looking forward to! I'll let you know when the plugin proposal template is ready, busy with the plugin API proposal itself right now!

IvanGoncharov commented 4 years ago

@acao Not sure that foundation should host plugins that wrap 3rd-party libraries/tools. I think it should be hosted by projects themselves or by the community on external repos.

acao commented 4 years ago

makes a lot of sense! i think we can host these discussions here for third party modules as a way to capture interest, since this is frequently requested, but most of the actual plugin proposals people are about to be making will be built/maintained elsewhere. does that make sense? even for third party plugins, best to keep all the proposals under one roof for now.

IvanGoncharov commented 4 years ago

@acao Totally fine with proposals 👍 and thinking it's an excellent repo to collect them and think about them as use cases to design plugin API.

FluorescentHallucinogen commented 1 year ago

Here's the current GraphiQL structure:

graphiql-plugins-before

So the plug-ins can only use the left side of GraphiQL?

Here's the GraphQL Voyager UI:

graphql-voyager

Is it possible to create plug-ins that (also) use the right side of GraphiQL?

graphiql-plugins-after

As an idea, the GraphQL Voyager plug-in for GraphiQL could use the left side for docs (e.g. built-in GraphiQL Docs) and the right side for graph visualization.

If the user clicks on a type/field on the left side, the visualization focuses on that type/field, and vice versa.

thomasheyenbrock commented 1 year ago

Is it possible to create plug-ins that (also) use the right side of GraphiQL?

With the current plugin API this is not possible. However, you can render anything you want in the plugin component, for example you could add a "full-screen dialog" which would give you the most amount of screen possible which might make sense for this kind of plugin.

thomasheyenbrock commented 1 year ago

Also note that the plugin pane can be resized to take up the full width of the page: CleanShot 2022-10-14 at 13 29 19