Cannot establish websocket connection

Hi, i am trying to use graphql subscription with an api through tyk.
when i try to do it directly without tyk it works and the connection is established (with wss:///graphql).
so in the Target URL in the api setting inside the gateway dashboard i put:
“ws:///graphql”
and in the client “wss:///graphql” and cannot establish connection
I added a screenshot of the error i"m getting inside the api’s logs
Thank you in advance for your help !

Hi @itzhakyos what kind of API are you using? (HTTP, GQL, OAS)

If you are using the graphql API type. Are you setting the subscription_type on the API def?

yes i’m using GQL Api and i have already set the subscription_type, no help…

Hey,

a basic question if you don’t mind:
Which version of the Gateway are you using?
The graphql-transport-ws protocol between the client and the gateway will be available in 5.2 only, before that it’s only graphql-ws. Try switching your header value to graphql-ws, it should work.