graphql-client
graphql-client copied to clipboard
Subscription Fails silently when using InitPayload
When using these websocket options, subscriptions fail silently without any error. Is this the correct usage?
client.Options.ConfigureWebSocketConnectionInitPayload = o =>
new Dictionary<string, string>
{
{"X-DUG-Auth", "XXXXXXXXXXXXXX"}
};
@maaft you can see this closed issue (https://github.com/graphql-dotnet/graphql-client/issues/304) where I asked the same. There you have an example.
You have to set a Func(GraphQLHttpClientOptions options) not a Dictionary<string, string>
@maaft you can see this closed issue (#304) where I asked the same. There you have an example.
You have to set a
Func(GraphQLHttpClientOptions options)not aDictionary<string, string>
@ClarenceMG , I tried the same way you have mentioned in your issue . Though I was able to validate the header through payload, i found that the call dint go to Subscription's resolver in my server. Note: I used DefaultSocketSessionIntercpetor class to validate token.