Ria May Dewi
03/31/2021, 3:11 PM{
flow{
id
name
schedule
}
}
And the result is:
{
"id": "86f5fb6f-26c9-4ffe-9961-f28e5538b53b",
"name": "spark",
"schedule": {
"type": "Schedule",
"clocks": [
{
"cron": "0 1 * * *",
"type": "CronClock",
"day_or": true,
"labels": null,
"end_date": null,
"start_date": null,
"__version__": "0.14.13",
"parameter_defaults": {}
}
],
"filters": [],
"or_filters": [],
"__version__": "0.14.13",
"adjustments": [],
"not_filters": []
}
nicholas
query {
flow_group {
id
schedule
}
}
Ria May Dewi
03/31/2021, 3:21 PMmutation {
set_flow_group_schedule(input :{
flow_group_id: "8d413fc1-5a18-4ae8-a9af-9507c3d0b6ed",
cron_clocks: [{cron: "0 4 * * *"}],
timezone:"UTC"
}) {
success
}
}
nicholas
from prefect.client import Client
client = Client()
client.query("<<your query>>")
Ria May Dewi
03/31/2021, 3:28 PMquery = {
"mutation": {
with_args("set_flow_group_schedule", {
"input": {
"flow_group_id": "b9b8f256-64a6-4438-a19b-0ce964121af8",
'cron_clocks': [{cron: "0 4 * * *"}],
"timezone": "UTC",
}
}):
{
"success" : True
}
}
}
result = client.graphql(query)
print(result)
And i get the error message like this:
NameError: name 'cron' is not defined
Jim Crist-Harif
03/31/2021, 3:29 PMcron
as a key, you probably meant this to be a string as {"cron": "0 4 * * *"}
Ria May Dewi
03/31/2021, 3:31 PMRia May Dewi
04/01/2021, 3:35 PMorder_by: desc
in graphql client?
I have an error like this
GRAPHQL_VALIDATION_FAILED: Expected type order_by, found "desc". Did you mean
the enum value desc?
Jim Crist-Harif
04/01/2021, 3:36 PMdesc
in `prefect.utilities.graphql.EnumValue`:
{"order_by": EnumValue("desc")}