-
Notifications
You must be signed in to change notification settings - Fork 24
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
Expose graphql-voyager into the workspace #17
Comments
Yeah, I like the project. I think it is a great idea, we just need to wait for them to publish an NPM package graphql-kit/graphql-voyager#1 |
Oky great to hear ! |
Just tried it. Looks like it will not work in a current state. From what I can tell, the NPM package contains only 2Mb webpack-compiled bundle and original TypeScript files (together with other files from git repo). We can't really use typescript since it's not used in this graphiql-workspace (it uses es6 and compiled with babel). When I try to use it as described in the documentation, it explodes with following error:
I looked around a bit, but haven't found any mention of It would be nice it npm module could provide es5-compiled artifacts instead of a full webpack bundle (similar to GraphiQL and graphiql-worksapce). |
@OlegIlyenko I have just released a new Regarding exposing es5 compiled artifacts. I think this is not possible at the current stage as we heavily use What do you think? |
Sweet! Thanks a lot, @RomanGotsiy! I just checked it again, and it works 🙌 🎉 Though I'm not yet sure where to put it, so it's now right in the middle :D It works great in terms of interaction right after initial load! Some issues I noticed right away:
My main concern is not the size of the artifact, but rather the fact that That said, I totally can understand that it is very early stage in development. So things are a bit rough around the ages, but it's completely fine at this stage. Just wanted to provide some (hopefully) useful feedback (just could not wait to experiment with embedding it, graphql-voyager is an awesome project!) If you would like to look how I embedded it for this POC, you can check this branch: https://github.com/OlegIlyenko/graphiql-workspace/compare/poc-voyager @tlvenn maybe you also would be interested in experimenting with it :) |
@OlegIlyenko thanks for awesome feedback! 🙌
yes, that's why I'm going to pack only voyager files with webpack and externalize other dependencies as much as possible. Hope will finish it next week.
Thanks for sharing your work on a branch. This will definitelly help me to catch all theese issues. I will keep you updated about the progress here ✉️ |
@OlegIlyenko hey. Finally I found some time to fix those issues. I have released a new version and fixed a minor issue with integration into worksapce (opened PR #18) I have also created lib bundle without majority of dependencies included. Now it is 692KB vs >2MB unminified. |
As far as UI integration goes @OlegIlyenko, I was thinking of using a sticky right tab with only the graphql-voyager icon in it. |
Oups overlooked your comment on tab integration, my bad. Let me know if I can assist in that area. |
@RomanGotsiy any chance some memoization on your side could help the re render process ? |
@tlvenn there is some kind of memoization within each separate Voyager instance. It is bound to schema and is used for view settings (enable/disable relay, change root). When schema is changed it is cleared. |
@RomanGotsiy thanks a lot! I will check it out as soon as I get some time 👍 Regarding UI integration. Maybe it would be ok at the beginning to make it fullscreen and activateable on-demand with big close button in the top right corner. Similar to what graph.cool did. Based on what I saw in graph.cool integration and my own experiments, it re-fetches the schema every time it is shown. But I need to doublecheck it, maybe new version improves it or in my experiments I mount/unmount component every single time so the full lifecycle kicks in. |
@OlegIlyenko fyi: you can provide either function or directly introspection as a javascript |
@OlegIlyenko what do you think about exposing https://github.com/APIs-guru/graphql-voyager into the workspace directly, maybe as a sticky tab on the right ?
The text was updated successfully, but these errors were encountered: