Skip to content

Trying to understand socket, @live and refetch logic #768

Answered by n1ru4l
strblr asked this question in Q&A
Discussion options

You must be logged in to vote

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 the SocketIOGraphQLClient 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

const onExecutionResult = ({ id, isFinal, ...result }: any) => {
const record = operations.get(id);
if (!record) {
return;
}
record.publishValue(result);
if (isFinal) {
record.iterator.return?.();
ope…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@strblr
Comment options

@n1ru4l
Comment options

@strblr
Comment options

Answer selected by strblr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants