Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3.0] Unable to call Hasura's own API with cron triggers #5438

Closed
jflambert opened this issue Jul 22, 2020 · 2 comments
Closed

[1.3.0] Unable to call Hasura's own API with cron triggers #5438

jflambert opened this issue Jul 22, 2020 · 2 comments

Comments

@jflambert
Copy link
Contributor

With hasura/graphql-engine:v1.3.0-beta.3.cli-migrations-v2, this following cron trigger used to work:

- name: purge-hasura-logs
  webhook: http://localhost:8080/v1/query
  schedule: '* * * * *'
  include_in_metadata: true
  payload:
    args:
      sql: TRUNCATE hdb_catalog.event_invocation_logs; DELETE FROM hdb_catalog.event_log
        WHERE delivered = TRUE OR error = TRUE;
    type: run_sql

I would get the following request + response

image
image

With the official 1.3.0 Hasura release, I get the following request + response

image
image

I understand the beta features are not necessarily expected to work as-is in the stable release, but it seems a huge oversight not to be able to call your own API. Or am I doing something wrong?

@praveenweb praveenweb added the k/bug Something isn't working label Jul 23, 2020
@tirumaraiselvan tirumaraiselvan removed the k/bug Something isn't working label Jul 28, 2020
@tirumaraiselvan
Copy link
Contributor

Hi @jflambert

This was an intentional change as reported in this issue: #5253 . Sending metadata with the payload is quite important and may induce breaking change if we didn't do it.

We are aware that this breaks your workflow where you wanted to call hasura internally. We do want to enable this and I think this issue: #5050 that you had raised earlier is best place to track this.

Meanwhile, the current way to use scheduled triggers to call hasura is via an external webhook. I am closing this issue as this was intentional and let's continue the discussion in #5050

@jflambert
Copy link
Contributor Author

@tirumaraiselvan I understand. This metadata took me by surprise though. I'll rephrase my request a bit, because my original scope was only about a shortcut to the local API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants