-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
When the exact same arguments are used across multiple subscriptions with different selections, GQty will generate the same query alias for them, leading to an incorrect cache update.
Consider the following case in React:
const sub1 = useSubscription();
sub1.foo({ bar: "baz" }).field1;
const sub2 = useSubscription();
sub2.foo({ bar: "baz" }).field2;While sub1 and sub2 subscribes with a different ID in the WebSocket layer, they are stored to the cache under the same alias because of .foo({ bar: "baz" }), essentially gluing "next" message payloads for both sub1 and sub2.
The solution is to generate a unique alias for each subscription.
Thanks @jsjs_dev for reporting in Discord.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels