-
Notifications
You must be signed in to change notification settings - Fork 5
General graphql notebook #7
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
Comments
That's possible. The pieces that are GitHub specific right now are:
The pieces which can be shared are:
Do you have a specific GraphQL API in mind that I can look into adding generic support for? |
I was more thinking of providing a configuration for an endpoint so that you can run it against any graphql api. |
For example when you host your own graphql server. |
@joyceerhl would love to join forces for this! we are currently rewriting thus, a simple endpoint configuration could be sufficient as @sschneider-ihre-pvs suggested, or optionally with we have a few useful utilities that may be useful:
|
I'd love to add notebooks support in OTOH, I'm relatively new to GraphQL and did not know that graphql config files were a thing--thanks for all the pointers! I think it would be pretty straightforward to introduce a generic |
\o/ |
@joyceerhl that sounds awesome! I got to work with @rebornix when creating monaco-graphql 🤓 Keeping it that simple seems like it will be great for you and your users. Apologies for hijacking this feature request 😬. graphql-config is probably a lot more than you need to worry about at this point, let alone our LSP server. Really excited about this project! Let me know if there’s any way we can help :) |
@acao it was great time pairing with you on monaco-graphql. I have been working on the notebook support for the last two years. It sounds like great idea to have a generic graphql notebook, which has basic execution support (through graphql-config) and intellisense (through graphql-languageserver). Once we have a generic graphql notebook, the github graphql support can be done through a notebook controller, which offers execution (and authentication under the hood). From users's perspective there is no difference, so this is more or less an implementation detail. |
I have a bare-bones prototype of a generic GraphQL notebook which lets you run and save queries based on endpoints in your GraphQL config files: gqlnb.mp4In the recording above, I'm creating a single 'GraphQL' notebook controller, and at runtime I'm reusing the
I prototyped this in
And by putting the GitHub schema file in the project root and referencing it in my config file, I also get syntax highlighting and some schema help. The branch is here (fair warning, this code is not production ready and I'm sharing it just so you have an idea of what it takes to hook the existing execution logic up to a notebooks UI): joyceerhl/vscode-graphql-notebook@1c5e631 Some notes from this prototype:
|
We can probably leverage the controller affinity to improve this. We can have a preferred endpoint for a workspace, which can be used as the default controller. When users switch to another controller, it will be memorized for current notebook document. Re Variable. I'm wondering if it makes sense to explore variable form in outputs to make it more Notebook-y. When users run a query, generate a template variable json, with placeholders, in a pending output. Users can fill them in to continue the execution. This would also align with the new UX @acao and team proposed in graphiql roadmap, hiding the variable view by default and revealing it only when necessary. This might require hookups between execution and output renderer. I'd love to help prototype this if you want @joyceerhl . |
@joyceerhl this branch of yours is amazing! I'm so excited for where we can take things for our users. I forgot to mention that we're migrating As far as joining with As far as the network helper, I was thinking of replacing that with With subscriptions, you're correct, the intention is usually for long-running data subscriptions, such as with websockets or server sent events. We will need to have the user interrupt the exection With |
Hey so, I’m going to be working on finishing the migration of vscode-graphql this weekend! I think a separate extension is a great idea after some reflection - it could be used on top of Would folks here like to schedule a meeting that we can record and we can decide together on how it should work? Or use a working document? Y‘all are pacific coast I assume, and I’m in Berlin so meeting times are tricky |
Sorry for the late followup on this--I am more than happy to submit this functionality to |
If you don't mind, I would like to join in, just to see how you guys work :D |
@joyceerhl apologies myself for the delayed reply, I was in the midst of moving! That sounds great! I'm terribly sorry as I didn't fully explain the goal for the 1.0.0 of our extension You're all of course free to add the extension to our monorepo, or maintain it on your own however you please, and we would gladly contribute either way! I am available to meet today or tomorrow if that is still possible. How does somewhere between 10-2pm PST sound? whatever works best! |
Thanks for explaining, that makes sense to me 😊 let’s chat 12.30pm PST / 9.30pm Berlin time on Sunday? |
sounds great! |
@acao let me know what the best way to set up a call with you is 😅 I'm reachable |
Don't forget about me :) I wanna lurk a bit :D |
Published a pre-release of a generic GraphQL Notebooks extension which lets you select configured endpoints and execute queries against it: https://marketplace.visualstudio.com/items?itemName=joyceerhl.vscode-graphql-notebook I created a work backlog tracking what needs to go into a v1 release: GraphQL Notebooks I also published a pre-release of this GitHub GraphQL Notebooks extension which drops its notebook serializer in favor of depending on the serializer contributed by |
@joyceerhl hey there! I would still love to set up a call. I am sick with covid now, and on top of that have so many things to attend to before I can come back to OSS work, but hopefully we can set up something in the coming weeks |
@acao I’d love to meet—how does next weekend (May 7-8) look for you? |
@joyceerhl that works great for me! |
Great, shall we aim to meet at 10.30am PST / 7.30pm Berlin time on May 7? I think your Twitter DMs are locked so I don’t have a way to send you a Zoom/Google Meet link, but if you don’t mind setting it up, my email is joyceerhl@gmail.com 😊 |
What about having another channel in discord for this? |
@joyceerhl invite sent! Also apologies about my twitter account, I disabled it because I was getting too distracted 😂 @sschneider-ihre-pvs I think that would be a great idea! |
Communication problem, solved 👍 |
@sschneider-ihre-pvs for now, vscode-graphql channel in the discord should be fine. I will ask fellow mods about this, potentially a channel for general vscode + graphql discussion, for anyone working on vscode extensions related to graphql, with the eventual goal of delivering a language bundle of extensions for the community? update: the extension pack concept in vscode is what I'm referring to, a family of related, perhaps even some interdependent extensions that can all contribute towards a general experience of a language |
I've created a dedicated discord channel for this discussion on the graphql discord server! |
Is it possible to have a general graphql notebook not bound to github?
The text was updated successfully, but these errors were encountered: