You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constsub1 = useSubscription();
sub1.foo({ bar: "baz" }).field1;
constsub2 = 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.
The text was updated successfully, but these errors were encountered:
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:
While
sub1
andsub2
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.
The text was updated successfully, but these errors were encountered: