Replies: 6 comments 2 replies
-
It also allows grpc-web to work without a gateway and other complex things. This works with standard GRPC web client liek flutter and any other GRPCWeb Client lib. It also allows any Golang wasm to also work. The following example code is building the client code as golang. The React GUI then uses that golang WASM to do all the communications with the golang server using just GRPC. |
Beta Was this translation helpful? Give feedback.
-
I gave this a shot seems like the |
Beta Was this translation helpful? Give feedback.
-
wI have used nhooyr/websocket it with all the browsers on desktop and mobile. Its def mature. Lacking latest uüdates though as maintainer is sort of having some life issues apparently. Here is a working example : https://git.sr.ht/~whereswaldon/pointstar/tree/master/item/makefile When you compile GraphJin to wasm with gorilla/websocket does it work in browsers ? Cause this is not the case from my own testing. And also its why practically every single golang lib that needs golang wasm and non wasm uses nhooyr/websocket. |
Beta Was this translation helpful? Give feedback.
-
Don't have a branch unfortunately. I just changed the code in place and tested with the web ui that comes with GraphJin as well as the Altair GraphQL client. Feel free to give it a try yourself the code is pretty easy to replace you'll find it in |
Beta Was this translation helpful? Give feedback.
-
I saw the commit and wasm demo. It’s a good start . The wasm demo is using rpc and not websockets I presume ? Do you still want me to try to modify the code to use the wasm web socket lib ? |
Beta Was this translation helpful? Give feedback.
-
https://github.com/altair-graphql/altair Looks cool. I think we could build the same with golang wasm. Is this one of your goals ? |
Beta Was this translation helpful? Give feedback.
-
https://github.com/nhooyr/websocket is the youngest golang websocket lib out there and actively maintained. It compiles to WASM which allows graphJIn GUI and other golang GUI's to use grapJin directly .
The API is a bit different from what gorilla/websocket offers, and one of the big advantages I see is that it solves a problem with a proper WebSocket closing handshake which is a bit hard to do right with Gorilla WebSocket. See: gorilla/websocket#448
Beta Was this translation helpful? Give feedback.
All reactions