Skip to content

Commit

Permalink
Prevent active teardown for queries on subscriptionExchange
Browse files Browse the repository at this point in the history
Fix #576
  • Loading branch information
kitten committed Mar 7, 2020
1 parent b8d4423 commit b81c79f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/src/exchanges/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ export const subscriptionExchange = ({
complete: () => {
if (!isComplete) {
isComplete = true;
client.reexecuteOperation({
...operation,
operationName: 'teardown',
});
if (operation.operationName !== 'query') {
client.reexecuteOperation({
...operation,
operationName: 'teardown',
});
}

complete();
}
Expand Down

0 comments on commit b81c79f

Please sign in to comment.