Search code examples
dockergraphqlapollohasura

x-hasura-user-id not taken in docker instance?


I have set up a local docker instance of my hasura cloud postgress/metadata setup.

Query functions work fine but I found an issue where when an insert has a dependency on hasura-user-id I get a null constraint error - this only happens on the docker version, on live it's fine.

I thought I had set this up correctly as I forced the clinicanid to be set to the hasura user id and I chekced the hasura-user-id was being sent up in the request, but for some reason I'm getting the null constraint exception unless I sent up the clinicianId through the graphql query, which I don't want to do

enter image description here


Solution

  • Turns out this was a rookie mistake, had forgotten to set the HASURA_GRAPHQL_JWT_SECRET in the docker config.