-
Notifications
You must be signed in to change notification settings - Fork 16
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
GraphQLClient Support #30
Comments
Hey @Sytten - thats cool that you’ve managed to add graphql_client support. Would be happy to accept a PR if you want to contribute it. |
For a bit more detail around "working on this lib": I've not been especially active in this repo because I've not had a solid use case for subscriptions myself yet and cynic has been taking up most of my open source time lately. Will probably be something I focus on more eventually. Built this as I wanted to have subscription support in cynic but figured it could be re-used for graphql_client and others so would be better off living outside of cynic. Happy if you want to fork & integrate it direct into graphql_client but I do think it'd be nice if all the ecosystem could benefit from any efforts made. |
Make sense. I agree that it would be nice to centralize efforts on websocket. I was looking at alternatives yesterday and I found https://github.com/AircastDev/glimesh-rs which wraps the whole handle of lower level connections quite nicely for graphql-client. They use a custom websocket protocol though (but the implementation looks solid), so I am thinking I want to build the equivalent but for normal people. I can either build the WS part using this lib or do it custom made, so it mostly depends on what you decide to do here. I also took a look at Gurkle WS implementation (https://github.com/technocreatives/gurkle/blob/main/crates/client/src/ws.rs) which has some nice ideas too. As a first step I would:
Then eventually add the graphql-ws protocol, fix bugs, add documentation, etc. |
Ah, nice. Hadn't seen that glimesh thing - shame it's not very standard but looks nice.
On this front it's entirely up to you. I'd like there to be a library that implements the websocket layer for graphql clients but I am not that bothered if it ends up not being this one. Happy to accept contributions and provide feedback if you do want to work off of this though (and can sort out commit access for you after a couple of PRs - I don't want to be a blocker).
Yeah, most of that sounds sensible. Removing the Happy for the cynic stuff to go into a module as well but probably slightly tricker to move it to a crate - likely to start running into fun with the orphan rule then. Around |
Yeah, I tried to upstream my changes najamelan/async_executors#7 and unfortunately the async_executors maintainer disagreed with them. Wanted me to go and try to make some changes in |
Unrelated but this fork added a WASM implementation which could be nice to incorporate: https://github.com/Yatekii/graphql-ws-client. Also they seem to have found a way to bring the executor up to date? Ha I edited my comment at the same time, take a look a gurkle too. Agreed for cynic, module is good. Ha I was confused then, that is good we don't really need to support the old protocol anyway. |
I shopped around for other runtime agnostic libraries but they all seem to suffer from the same problem. I found this interesting post rust-lang/wg-async#45 (comment) |
Yeah, would be get that PR into a state that it can be merged. Unfortunately they've not fixed the executor thing, just ignoring it because tokio doesn't matter in a frontend wasm context: #30 (comment) |
Interesting. The |
Actually, having looked at it - |
I found the |
Got it working: caido@8b14b5f |
Hey there!
I built a prototype implementation for GraphQLClient (over here https://github.com/caido/graphql-ws-client).
Do you still plan on working on this lib, if so I will upstream my changes otherwise I will go my own way and most likely try to integrate it directly in GraphQLClient.
The text was updated successfully, but these errors were encountered: