Closed
Description
I have this code:
final websocketLink = WebSocketLink(
subscriptionUri,
config: SocketClientConfig(
autoReconnect: true,
delayBetweenReconnectionAttempts: const Duration(seconds: 2),
initialPayload: () {
return authTokenService.addAuthHeader(EnvVariables.currentHost);
},
),
subProtocol: GraphQLProtocol.graphqlTransportWs,
);
link = Link.split(
(request) => request.isSubscription,
websocketLink,
link,
);
but subscription stuck with state: Initialising connection and no messages are comming through.
It would useful to have documentation (at least me - could not find it) or if you guys could share any possible reasons for this.
Without this i canno tmove my app to new backend which uses new protocol :(
p.s. I even reduced it to:
final websocketLink = WebSocketLink(
subscriptionUri,
subProtocol: GraphQLProtocol.graphqlTransportWs,
);
link = Link.split(
(request) => request.isSubscription,
websocketLink,
link,
);
}
by removing auth but result is the same....