Is it possible to call a Hasura GraphQL REST endpoint from a Cron Event? #7917
-
Hi all! I'm having trouble setting up the following:
I'm able to define the Cron Trigger, pointed at my REST endpoint with an empty ( However, the invocations fail with a {
"body": "{\"path\":\"$\",\"error\":\"Unexpected variable scheduled_time\",\"code\":\"bad-request\"}"
} I believe this is because of the "double" {
"payload": {
"scheduled_time": "2021-12-13T04:46:00Z",
"payload": {},
"name": "Cron Trigger Name",
"id": "55eea74e-87ed-4672-ac5b-20a865ceb897"
},
"headers": [
{
"value": "application/json",
"name": "Content-Type"
},
{
"value": "hasura-graphql-engine/v2.0.10-cloud.1",
"name": "User-Agent"
}
],
"version": "1"
} I'm wondering if anyone has ideas on how to get around this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, this should be possible very soon with Schedule Trigger Transforms in which you can change the payload structure of a cron event to adhere to the the mutations payload. See similar issue here: #5050 |
Beta Was this translation helpful? Give feedback.
Hi, this should be possible very soon with Schedule Trigger Transforms in which you can change the payload structure of a cron event to adhere to the the mutations payload. See similar issue here: #5050