Tag: flutter-web
-
How to close the websocket in graphql config flutter?
1 class GraphqlConfig { final serverLink = Link.split( (request) => request.isSubscription, WebSocketLink( "mylink" ), HttpLink("mylink", defaultHeaders: <String, String>{ })); initClient() { ValueNotifier<GraphQLClient> client = ValueNotifier( GraphQLClient( link: serverLink, cache: GraphQLCache(), ), ); return client; } GraphQLClient clientToQuery() { return GraphQLClient( cache: GraphQLCache(), link: serverLink, ); } } I got the following exception DOMException: Failed to…