Auth Webhook "request" is null #10623
-
This is the payload content my Auth Webhook receives when I am making a graphql request:
But this is the payload content my Auth Webhook received when I make a request to a RESTified Hasura Endpoint:
Is there a possibility that I am missing some configuration or is this the current behavior? The Hasura version used is also v2.26.0 Edit: I also set my HASURA_GRAPHQL_AUTH_HOOK_MODE to POST in my docker-compose and HASURA_GRAPHQL_AUTH_HOOK_SEND_REQUEST_BODY to true. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi, I also tried updating my Hasura to v2.45.1 and the behavior remains the same wherein only graphql requests populate the "request" field while the RESTified Endpoint requests "request" field is still null. |
Beta Was this translation helpful? Give feedback.
-
@dereky565 — sorry for the delay. FWIW, this is stumping me, too 😅 Let me reach out to someone who was on the team that built this feature and see if they can drop some knowledge for us all 🙏 |
Beta Was this translation helpful? Give feedback.
-
Unfortunately the |
Beta Was this translation helpful? Give feedback.
Unfortunately the
request
field is not set when using a restified endpoint. The auth hook is invoked before we actually process the request and look up the GraphQL stored for that rest endpoint, so it's not available to be sent to the auth hook. This is unlike normal GraphQL requests where the query text is in the incoming request body, so we've got it to send to the auth hook (hence why it's in the "request" property). For a restified endpoint, the graphql query text is not in the http request, so the "request" property ends up being null.