Open anirudhsharma392 opened 5 years ago
I have the same problem. No info on websocket connection state with this client :
final sessionToken = await storage.read(key: 'session_token');
AuthLink _authLink = AuthLink(
getToken: () async => 'Bearer $sessionToken',
);
HttpLink _httpLink = HttpLink(
uri: '$backendUrl/graphql',
);
print('je suis appelé');
final WebSocketLink websocketLink = WebSocketLink(
url: 'ws://12da74dc.ngrok.io/graphql',
config: SocketClientConfig(
autoReconnect: true,
inactivityTimeout: Duration(seconds: 30),
),
);
Link _link = _authLink.concat(_httpLink).concat(websocketLink);
client = ValueNotifier(GraphQLClient(
cache: InMemoryCache(),
link: _link,
));
And if I put anything for the websocket url it won't print an error. It doesn't say anything.
It works great with Queries and Mutations though
this loading function do not gives me live update about the connection. it always returns true. So all i want is to get data printed by Subscription widget on console get stored in some variable.