-
Notifications
You must be signed in to change notification settings - Fork 308
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
Introduce GraphQLWebSocketClient #330
Conversation
… into prisma-labs-master # Conflicts: # src/index.ts # src/types.ts
Any plans to merge? |
Need to look |
is there any progress? when is it merged? @jasonkuhrt |
@jasonkuhrt What changes do I have to make? It's not clear to me. Should I find a dependency which declares such data structure? |
I find it highly surprising that we have to invent this much code inline to get client side GraphQL websockets working. I see two approaches here:
I'm inclined toward (2) because I do not have time to actively develop on this project right now. Currently I just help the community iterate. |
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.
I'll give a few more days for community feedback and then merge this otherwise.
Ok it has been a few days. Let's give it a try. Super open to hearing feedback and receiving more iteration around this. |
Super excited to see this! What's the best way to try this out? Can you release under the |
Will do, looks like CI needs some fixing, something it depends on changed. |
@lyubo i am getting an error, you can send any sample?
|
You can look at test code: tests/graphql-ws.test.ts Basically, you should do the following:
If you want to know when the socket gets acknowledged (according to the graphql-trasport-ws protocol) you can supply a callback function:
The WebSocket implementation I use in my code is reconnecting-websocket |
Any plans to document it? 👀 |
is there a doc that shows how to subscribe to GQL events? |
I'm getting a TS error after upgrading to 5.0.0.
I tried adding a dependency on |
Running into the same issue, this broke us. Node does not have |
I am getting exact same error, any news here? |
Partially resolves #77
This implementation uses WebSocket communication channel between the server and the client.
Supported protocol is graphql-transport-ws
All operations (queries, mutations, subscriptions) are supported.
This implementation itself adds no new dependencies. Added development dependencies (ws, @types/ws, graphql-ws) are used to setup a test server.