Closed praneethreddyt closed 1 year ago
You are using the header in the wrong way.
You may want take a look to this enum https://github.com/zino-hofmann/graphql-flutter/blob/main/packages/graphql/lib/src/links/websocket_link/websocket_client.dart#L162-L176 and Just grab the code on how it is used
tried to pass custom headers in web-socket link. i have tried passing headers in headers and also in initial Payload. i am receiving "Sec-WebSocket-Protocol" header but not the custom headers.below is my code. thanks in advance. final WebSocketLink websocketLink = WebSocketLink( url, config: SocketClientConfig( autoReconnect: true, inactivityTimeout: Duration(seconds: 30), initialPayload:()=>{ "headers": { "Sec-WebSocket-Protocol": "graphql-ws", "device_id":"PKQ1", } }, headers :{ "device_id":"PKQ1", "Sec-WebSocket-Protocol": "graphql-ws", } ), );