graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

Proposal: GraphQL Voyager plugin

Open FluorescentHallucinogen opened this issue 4 years ago • 6 comments

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

FluorescentHallucinogen avatar May 18 '20 14:05 FluorescentHallucinogen

@acao @IvanGoncharov @RomanHotsiy cc.

FluorescentHallucinogen avatar May 18 '20 14:05 FluorescentHallucinogen

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!

acao avatar Jun 16 '20 22:06 acao

@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.

IvanGoncharov avatar Jun 18 '20 19:06 IvanGoncharov

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.

acao avatar Jun 18 '20 19:06 acao

@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.

IvanGoncharov avatar Jun 19 '20 18:06 IvanGoncharov

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.

FluorescentHallucinogen avatar Sep 10 '22 08:09 FluorescentHallucinogen

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 avatar Oct 14 '22 11:10 thomasheyenbrock

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

thomasheyenbrock avatar Oct 14 '22 11:10 thomasheyenbrock