You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Server Version: v2.43.0
CLI Version (for CLI related issue):
Environment
Docker v2 engine
What is the current behaviour?
I'm having a slight issue with Hasura, and I'm hoping it's just something silly on my side. I'm using the latest Docker version with a POST auth hook. Everything is working great, but I'm trying to get some extra insight into the queries/mutations/subscriptions that are happening and logging it. For a POST auth hook, Hasura sends request data and client headers in the body of the request. That's all working fine, but when it comes to subscriptions, I seem to always get "request": null. For query and mutation those are filled out properly with the operation name, query itself, and the values. I know the subscriptions are properly formatted because I get the data back as expected, it's just when trying to get this request data for logging.
What is the expected behaviour?
For subscriptions, I would expect the request field to also not be null and to be filled out in the same way as query/mutation information. Specifically, in the auth webhook data, I'd expect to see {"operationName": "subscriptionNameHere", "query": "the actual raw subscription", "variables": "any variables used"}
How to reproduce the issue?
Set up a POST auth webhook with JWT and print the body of the message that's sent from Hasura to your auth webhook.
Screenshots or Screencast
Please provide any traces or logs that could help here.
Here's some logs that I see on my end. I specifically make a query for the current data and then immediately afterwards start a subscription for new data. I print out the raw hasura info and then a parsed version that's a bit easier to read.
Version Information
Server Version: v2.43.0
CLI Version (for CLI related issue):
Environment
Docker v2 engine
What is the current behaviour?
I'm having a slight issue with Hasura, and I'm hoping it's just something silly on my side. I'm using the latest Docker version with a POST auth hook. Everything is working great, but I'm trying to get some extra insight into the queries/mutations/subscriptions that are happening and logging it. For a POST auth hook, Hasura sends request data and client headers in the body of the request. That's all working fine, but when it comes to subscriptions, I seem to always get
"request": null
. For query and mutation those are filled out properly with the operation name, query itself, and the values. I know the subscriptions are properly formatted because I get the data back as expected, it's just when trying to get thisrequest
data for logging.What is the expected behaviour?
For subscriptions, I would expect the request field to also not be null and to be filled out in the same way as query/mutation information. Specifically, in the auth webhook data, I'd expect to see
{"operationName": "subscriptionNameHere", "query": "the actual raw subscription", "variables": "any variables used"}
How to reproduce the issue?
Set up a POST auth webhook with JWT and print the body of the message that's sent from Hasura to your auth webhook.
Screenshots or Screencast
Please provide any traces or logs that could help here.
Here's some logs that I see on my end. I specifically make a
query
for the current data and then immediately afterwards start asubscription
for new data. I print out theraw hasura info
and then a parsed version that's a bit easier to read.Any possible solutions/workarounds you're aware of?
None, I can't seem to get the subscription data sent to my auth webhook.
Keywords
auth, webhook, subscription, logging
The text was updated successfully, but these errors were encountered: