-
Notifications
You must be signed in to change notification settings - Fork 20k
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
graphql: upgrade UI to v2 #27294
graphql: upgrade UI to v2 #27294
Conversation
Turns out adding: |
This PR loads the data into memory,
Is it worth it? Browsers should only fetch it once, and then cache it for the future. But even if that is not the case, I tested fetching the heaviest file 100 times
With on-the-fly loading:
I'd say it's about same same. If anyone wants to make a public graphql server able to handle high demands, they should add a caching nginx or something in front. I'll push some changes... |
PTAL. I changed it so it now loads on demand. Also, I undid the charset-fix, so we can keep the asset identical to the upstream version. The proper fix is to set the charset in the http header instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Good point. We don't need to impose the initial loading on every user even if they don't want to use graphiql. Your changes LGTM |
Upgrades graphiql to v2.4.4. The interface has become much nicer, and there are extra features like tabs, history, dark mode etc. This change also now uses golang embed to bundle the resources. --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
This reverts commit db3e117.
This reverts commit db3e117.
Upgrades graphiql to v2.4.4. The interface has become much nicer. There are extra features like tabs, history, dark mode etc.
Also now instead of sourcing the JS and CSS files from CDN they are embedded in the binary. That makes offline usage of the UI possible.
It works fine. Only there is a slight issue: sometimes white spaces are displayed weird
I realized that when in
index.html
I replace this line:with:
the issue goes away. Even tho they are the same file!