-
Hi, I made some tests on my app using your Socket.IO server and client, and Turns out it depends on whether the I have no idea what's going on in the background that makes that happen. My intuition tells me that the server loses completely track of user A if the socket connection is lost, thus deleting every server state about him. Then on reconnection, entire new queries have to be made. Why does the behavior change depending on the presence of the Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
An operation that is finished is disposed of by the See Live queries never have an In order to avoid Mutations being executed twice, I recommend sending a client-generated transaction-id that can be used for identifying whether a mutation operation got executed before, but failed to deliver the mutation execution result to the client due to the network interruption. |
Beta Was this translation helpful? Give feedback.
An operation that is finished is disposed of by the
SocketIOGraphQLClient
. A "normal" mutation and query are simply executed and after the last result comes in theSocketIOGraphQLClient
client deletes any reference to it and is no longer aware of it. This is basically the behavior of all GraphQL clients out there today.See
graphql-live-query/packages/socket-io-graphql-client/src/createSocketIOGraphQLClient.ts
Lines 29 to 40 in c77923d