Enable user supplied id for connection init, connection close and create subscription #587
Unanswered
gowthambala
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi, the ID is already part of each request sent to the server. Corresponding The ID in the protocol refers to the "operation", not to the websocket connection. Therefore It is not possible to set this ID externally. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Everyone,
Firstly thank you for creating this awesome library!. I am using the graphql client to talk to a third party graphql server implementation. I am using the client only for subscriptions and not for queries or mutations. The third party server, unfortunately, requires an unique ID to be sent with connection init, subscribe and complete messages. something like below
{"id":"bd60c1937b054b288731820ae7f980a8",type":"connection_init","payload":{""....
{"id":"bd60c1937b054b288731820ae7f980a8","type":"subscribe","payload":{""....
{"id":"bd60c1937b054b288731820ae7f980a8","type":"complete"}
but currently we send an id only with create subscription. but that too, the id seems to be autogenerated.
var startRequest = new GraphQLWebSocketRequest
{
Id = Guid.NewGuid().ToString("N"),
Type = GraphQLWebSocketMessageType.GQL_SUBSCRIBE,
Payload = preprocessedRequest
};
Is it possible to manually send in this ID ? and is there a way I can get this ID to go out as part of all the three messages? connection_init,subscribe and complete?
Beta Was this translation helpful? Give feedback.
All reactions