Skip to content

Commit 2afd583

Browse files
deprecate(graphql): deprecate the SocketSubProtocol to improve naming
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 0d8a3d0 commit 2afd583

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/graphql/lib/src/links/websocket_link/websocket_client.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,20 @@ class SocketClientConfig {
141141
}
142142
}
143143

144+
/// All the protocol supported by the library
145+
@Deprecated("`SocketSubProtocol`is deprecated and will be removed in the version 5.2.0, consider to use `GraphQLProtocol`")
144146
class SocketSubProtocol {
145147
SocketSubProtocol._();
148+
/// graphql-ws: The new (not to be confused with the graphql-ws library).
149+
/// NB. This protocol is it no longer maintained, please consider
150+
/// to use `SocketSubProtocol.graphqlTransportWs`.
151+
static const String graphqlWs = GraphQLProtocol.graphqlWs;
152+
/// graphql-transport-ws: New ws protocol used by most Apollo Server instances
153+
/// with subscriptions enabled use this library.
154+
/// N.B: not to be confused with the graphql-ws library that implement the
155+
/// old ws protocol.
156+
static const String graphqlTransportWs = GraphQLProtocol.graphqlWs;
157+
}
146158

147159
static const String graphqlWs = "graphql-ws";
148160
static const String graphqlTransportWs = "graphql-transport-ws";

0 commit comments

Comments
 (0)