Skip to content
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

Add section on GraphiQL to the documentation including advice on customizations #403

Closed
m4st3rm4tz3 opened this issue Jun 2, 2022 · 5 comments
Assignees
Labels
in: web Issues related to web handling type: documentation A documentation task
Milestone

Comments

@m4st3rm4tz3
Copy link

The links for the external libraries inside GraphiQLs index.html are hardcoded and point to unpkg.com. Because of this it is currently not possible to host an api with /graphiql enpoint in an offline environment.

It would be great if GraphiQL offline support could be added! Maybe by putting the needed libraries inside the resources folder too, like the graphql-java-kickstart/graphql-spring-boot project.

Or is there currently a known workaround for this problem?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 2, 2022
@bclozel
Copy link
Member

bclozel commented Jun 3, 2022

This is something we considered more broadly in #20 and #204 (comment).

Shipping 3rd party libraries with our own spring-graphql JAR will tie our release cycle with those and can become a liability. What happens if a new major/minor version of the library is released, should we upgrade as soon as possible, possibly breaking custom integrations written by developers? What happens if the 3rd party library has a CVE - in this case, we'd have a CVE of our own as well and we'd need to ship a new version of Spring for GraphQL.

This also opens the door for many customizations, plugins, possibly a build that's more involved to produce custom versions of those libraries built from sources, things that graphql-java-kickstart invested in.

In my opinion, our time and energy would be better spent documenting how to build and integrate your own GraphiQL instance with Spring for GraphQL: this would not only cover your use case, but also give you more freedom to customize things more. Would this approach help?

@m4st3rm4tz3
Copy link
Author

m4st3rm4tz3 commented Jun 3, 2022

Oh, I didn't see that issue. Sorry! I totally get the downsides of shipping the external libraries with the spring-graphql jar, but your suggested approach would be perfectly fine and help me a lot!

So the approach would be something similar to hosting my own static graphiql template on a /graphiql endpoint next to my graphql api with my spring boot app?

@bclozel bclozel added type: documentation A documentation task in: web Issues related to web handling and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 3, 2022
@bclozel bclozel added this to the 1.0 Backlog milestone Jun 3, 2022
@bclozel
Copy link
Member

bclozel commented Jun 3, 2022

No worries! This one is a bit different but we can tackle a bunch of related use cases like this.
I think we should document a simple build setup and show how to ship your own. In the process, we should ensure that the Spring Boot auto-configuration allows this.

@bclozel bclozel changed the title GraphiQL Offline Support Document how to ship custom GraphiQL build Jun 3, 2022
@LexanRed
Copy link

LexanRed commented Sep 1, 2022

Is there any documentation available yet? I was just running into this issue.
Offline development which requires graphiql is made hard.

I helped myself by using Altair as a standalone client, but having graphiql built in in a way which works offline would be great for us.

@bclozel bclozel self-assigned this Sep 2, 2022
@talniv18
Copy link

Hello, is there any progress with this issue? we also use graphql in offline environment, and although we use Postman as our client, it will be much better to make the graphiql work.

@bclozel bclozel modified the milestones: 1.2 Backlog, 1.2.0 Apr 27, 2023
@rstoyanchev rstoyanchev changed the title Document how to ship custom GraphiQL build Add section on GraphiQL to the documentation including advice on customizations Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues related to web handling type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

5 participants