quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.77k stars 2.68k forks source link

embed or link to graphiql that honors the headers? #33179

Open maxandersen opened 1 year ago

maxandersen commented 1 year ago

Description

would be nice to somehow have dev UI embed graphiql or link/provide info on how to run graphiql or similar to explore the setup graphql endpoints.

especially useful if it can setup headers so things like auth bearer will be honored (i.e. for https://api.github.com/graphql)

Implementation ideas

No response

quarkus-bot[bot] commented 1 year ago

/cc @cescoffier (devui), @jmartisk (graphql), @phillip-kruger (devui,graphql)

phillip-kruger commented 1 year ago

Are you talking about GraphQL Client ? W.r.t the server, if you have a GraphQL Service, that is secured, you can access the GraphiQL via the Security Dev UI Screen and it will pre-populate the authentication headers.

maxandersen commented 1 year ago

i have a graphql client that calls out. anyway to have it for that?

phillip-kruger commented 1 year ago

@maxandersen - if I follow you correctly, you want the graphiql for an external service ? Already secured ?

@jmartisk w.d.y.t ?

jmartisk commented 1 year ago

You want graphiql to have an option to use a configured GraphQL client underneath (and thus call a remote service) instead of calling localhost?

maxandersen commented 1 year ago

Yeah. Imagine you are using graphql towards GitHub graphql. The client url is then known and should be available to do tests against.

Wdyt?

jmartisk commented 1 year ago

We're currently working towards upgrading to GraphiQL 2.x, so after that is done, we can try and see if this would work. It might be useful.

Apart from the server-side extension providing a graphql-ui that runs against localhost, the client extension could provide a separate graphql-ui instance for each configured client.