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
I tried to integrate graphql-subscriptions and it worked out pretty good, But it broke the app (which i can fix easily.. but i don't think that's the right decision)
Subscriptions sends the updates for everything i am subscribed to, But when i create a new item, The store is already updated from the mutation i just ran, but Subscription kicks in and runs the logic which updates the store again.. And i get the duplicate key warning.
I can and have fixed this by checking if a record already exists and then handling the update., But this means that the updates are still sent to all the subscribed clients who want to be notified of the changes.
Is there any way to send updates to all the subscribed clients, Except the one making the changes/operations (CRUD), without writing lot of codes?
Ofcourse i can use setupFunctions filter but if the same user has opened the app in different tabs, this will not work out.
What do you recommend, How should i move forward with this.
The text was updated successfully, but these errors were encountered:
Unfortunately there is no support for this that I know of. The source of a mutation is completely separate from the message that triggers the subscription so there is no easy way to correlate the two independent events. Your approach of handling the issue client side is what we use as well. It could even be, based on your system architecture, that a client sees the subscription message before the mutation result.
I tried to integrate
graphql-subscriptions
and it worked out pretty good, But it broke the app (which i can fix easily.. but i don't think that's the right decision)Subscriptions sends the
updates
for everything i am subscribed to, But when i create a new item, The store is already updated from the mutation i just ran, but Subscription kicks in and runs the logic which updates the store again.. And i get the duplicate key warning.I can and have fixed this by checking if a record already exists and then handling the update., But this means that the updates are still sent to all the subscribed clients who want to be notified of the changes.
Is there any way to send updates to all the subscribed clients, Except the one making the changes/operations (CRUD), without writing lot of codes?
Ofcourse i can use setupFunctions filter but if the same user has opened the app in different tabs, this will not work out.
What do you recommend, How should i move forward with this.
The text was updated successfully, but these errors were encountered: