Describe the issue
I am trying to use subscriptions in my app, when I add a user using mutation ,mysubscription is fired. When I try to add user using mutation from my flutter app , mysubscription of backend is fired but the subscription of my flutter app does not
To Reproduce (MUST BE PROVIDED)
I don't see any error in my app. Check below video for more context
I tried using both Protocols GraphQLProtocol.graphqlWs & GraphQLProtocol.graphqlTransportWs but same issue.
My subscriptions work in react native with apollo client
Expected behaviorSubscription should occur in flutter app as well when add user mutation occurs but it doesn't. Subscription does work on backend when I try to add a user from flutter app with mutation. I don't see any error in logs
device / execution context
My backend is hosted locally, I have tried it on iOS simulator and a real android device, Queries and Mutation works but Subscription doesn't
additional context
I am using Node.Js backend with apollo-server and for subscription I use ws & graphql-ws library
additional notes
I have looked into the sample repos as well. Not sure what am I missing
Describe the issue I am trying to use
subscriptions
in my app, when I add a user usingmutation
,mysubscription
is fired. When I try to add user usingmutation
from myflutter
app ,mysubscription
of backend is fired but the subscription of my flutter app does notTo Reproduce (MUST BE PROVIDED)
I don't see any error in my app. Check below video for more context
https://github.com/zino-hofmann/graphql-flutter/assets/24708929/60b9a440-1110-4a0b-b169-72fcf416f61a
Here is my code
I have wrapped MaterialApp with ClientProvider
Then MyHomePage widget is as follows
I tried using both Protocols
GraphQLProtocol.graphqlWs
&GraphQLProtocol.graphqlTransportWs
but same issue.My
subscriptions
work inreact native
withapollo client
Expected behavior
Subscription
should occur in flutter app as well when add usermutation
occurs but it doesn't.Subscription
does work on backend when I try to add a user fromflutter
app withmutation
. I don't see any error in logsdevice / execution context My backend is hosted locally, I have tried it on iOS simulator and a real android device,
Queries
andMutation
works butSubscription
doesn'tadditional context I am using
Node.Js
backend withapollo-server
and for subscription I usews
&graphql-ws
libraryadditional notes I have looked into the sample repos as well. Not sure what am I missing