-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to add "GraphiQL Explorer"? #451
Comments
I've seen this UI somewhere. GraphiQL middleware just returns "simple" html - https://github.com/graphql-dotnet/server/blob/master/src/Ui.GraphiQL/Internal/graphiql.cshtml. I am not an expert in JS and frontend. Do you know how to change html? Are more serious server side changes required to support this functionality? |
Sorry, I'm not an expert when it comes to front-end stuff like JavaScript or TypeScript. However, I don't believe there's a need to change a lot of code on the server-side. I believe only the GraphiQL version update is required. I look into the "graphiql.cshtml" file that you mentioned and I noticed this (line 42 & 43) <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/graphiql/0.13.0/graphiql.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/graphiql/0.13.0/graphiql.min.js"></script> As you can see, the graphiql version is "0.13.0" which is the older version. Maybe all that needs to be done is just to use the latest version which is "1.0.6"? https://cdnjs.com/libraries/graphiql So line 42 & 43 in "graphiql.cshtml" should be modified to use version "1.0.6" instead probably. I hope that will do it but I didn't try that myself just yet. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/graphiql/1.0.6/graphiql.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/graphiql/1.0.6/graphiql.min.js"></script> I went to the https://github.com/graphql/graphiql and I saw this picture. They specify GraphiQL Explorer as an external key (not sure what that means). Latest Stable EcosystemIf this work, maybe others UI (Altair, Playground, Voyager) need a version update also probably? |
Just want to confirm that upgraded GraphiQL from version 0.13.0 to 1.0.6 did not add the GraphiQL Explorer to the GraphiQL UI. |
It should only require frontend changes, no change required on the server side. I could help to add it to GraphiQL. Ps: It should be available in Altair GraphQL as a beta plugin. |
This replaces the default GraphiQL with one that includes GraphiQL explorer Addresses graphql-dotnet#451
Created the PR for GraphiQL |
I would like to know if there is a plan to include GraphiQL Explorer (part of GraphiQL).
GraphiQL Explorer is very useful. It allows users to point and click on GraphQL node and it auto-generate the query.
Here's the example of GraphiQL Explorer https://api.spacex.land/graphql/
The text was updated successfully, but these errors were encountered: