Sandeep Aggarwal
08/27/2020, 1:32 PMdelete_flow_run
mutation is clashing with Hasura's auto-generated mutation schemas.
I am self hosting Prefect and as part of data retention policy, need to cleanup old data objects. I am using below mutation to cleanup old flow/task runs:
mutation($created_before: timestamptz) {
delete_flow_run(where: {created: {_lt: $created_before}}) {
affected_rows
}
delete_flow_run_state(where: {created: {_lt: $created_before}}) {
affected_rows
}
delete_log(where: {created: {_lt: $created_before}}) {
affected_rows
}
delete_task_run(where: {created: {_lt: $created_before}}) {
affected_rows
}
delete_task_run_state(where: {created: {_lt: $created_before}}) {
affected_rows
}
}
The request fails with below error:
2020-08-27T12:40:17.586Z {"message":"Unknown argument \"where\" on field \"delete_flow_run\" of type \"Mutation\".","locations":[{"line":3,"column":37}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}
2020-08-27T12:40:17.586Z {"message":"Cannot query field \"affected_rows\" on type \"success_payload\".","locations":[{"line":7,"column":9}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}
2020-08-27T12:40:17.586Z {"message":"Field \"delete_flow_run\" argument \"input\" of type \"delete_flow_run_input!\" is required, but it was not provided.","locations":[{"line":3,"column":21}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}
When I remove delete_flow_run
from above mutation, everything works fine.Dylan
08/27/2020, 1:54 PMaffected_rows
does look like something from Hasura’s schema, as our mutations only have success
and error
affected_rows
appear in the schema of the Interactive API?Sandeep Aggarwal
08/27/2020, 2:00 PMDylan
08/27/2020, 2:07 PMSandeep Aggarwal
08/27/2020, 2:10 PMDylan
08/27/2020, 2:10 PMSandeep Aggarwal
08/27/2020, 2:14 PMDylan
08/27/2020, 2:15 PMSandeep Aggarwal
08/27/2020, 2:16 PMDylan
08/27/2020, 2:16 PM