We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa596f7 commit f1225f0Copy full SHA for f1225f0
packages/api-client-core/src/GadgetConnection.ts
@@ -441,6 +441,18 @@ export class GadgetConnection {
441
requestPolicy: this.requestPolicy,
442
});
443
(client as any)[$gadgetConnection] = this;
444
+
445
+ const reexecuteOperation = client.reexecuteOperation.bind(client);
446
+ client.reexecuteOperation = (operation) => {
447
+ if (operation.query.definitions.some(isLiveQueryOperationDefinitionNode)) {
448
+ // live queries don't cleanup properly when reexecuted, plus
449
+ // they should never need to be reexecuted since they receive
450
+ // updates from the server, so we noop here
451
+ return;
452
+ }
453
+ reexecuteOperation(operation);
454
+ };
455
456
return client;
457
}
458
0 commit comments