Open Prabhdeep-Singh24 opened 1 year ago
Server Version: CLI Version (for CLI related issue):
hasura/graphql-engine:v2.9.0
Cloud/EKS
I am trying to set up subscriptions using the apollo client but I keep getting
My Apollo client config: const wsLink = new GraphQLWsLink( createClient({ url: getGraphqlUrl(true), options: { lazy: true, reconnect: true, connectionParams: async () => { const token = await getIdToken(); return { authorization: token ?Bearer ${token}: "", }; }, }, }) );
const wsLink = new GraphQLWsLink( createClient({ url: getGraphqlUrl(true), options: { lazy: true, reconnect: true, connectionParams: async () => { const token = await getIdToken(); return { authorization: token ?
: "", }; }, }, }) );
My jwl_url: { "claims_format": "stringified_json", "jwk_url": "https://cognito-idp.us-west-2.amazonaws.com/POOLID/.well-known/jwks.json", "type": "RS256", "header": {"type": "Authorization"}}
{ "claims_format": "stringified_json", "jwk_url": "https://cognito-idp.us-west-2.amazonaws.com/POOLID/.well-known/jwks.json", "type": "RS256", "header": {"type": "Authorization"}}
Get the following error in my Hasura Pod: Missing 'Authorization' or 'Cookie' header in JWT authentication mode When I hit my wss endpoint.
Missing 'Authorization' or 'Cookie' header in JWT authentication mode
I should be able to query my DB using websockets and keep connection alive.
What does ${token} resolve to? Can you print/log it in your client code to see it's actually getting it?
${token}
Version Information
Server Version: CLI Version (for CLI related issue):
hasura/graphql-engine:v2.9.0
Environment
Cloud/EKS
What is the current behaviour?
I am trying to set up subscriptions using the apollo client but I keep getting
My Apollo client config:
const wsLink = new GraphQLWsLink( createClient({ url: getGraphqlUrl(true), options: { lazy: true, reconnect: true, connectionParams: async () => { const token = await getIdToken(); return { authorization: token ?
Bearer ${token}: "", }; }, }, }) );
My jwl_url:
{ "claims_format": "stringified_json", "jwk_url": "https://cognito-idp.us-west-2.amazonaws.com/POOLID/.well-known/jwks.json", "type": "RS256", "header": {"type": "Authorization"}}
Get the following error in my Hasura Pod:
Missing 'Authorization' or 'Cookie' header in JWT authentication mode
When I hit my wss endpoint.What is the expected behaviour?
I should be able to query my DB using websockets and keep connection alive.
How to reproduce the issue?
Screenshots or Screencast
Please provide any traces or logs that could help here.
Any possible solutions/workarounds you're aware of?
Keywords