https://prefect.io logo
#prefect-community
Title
# prefect-community
j

Jessica Smith

06/02/2022, 6:32 PM
I'm getting a weird issue when querying flow runs in the GraphQL api.
Copy code
{
  "errors": [
    {
      "path": [
        "flow_run",
        0,
        "id"
      ],
      "message": "Cannot return null for non-nullable field flow_run.id.",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ],
  "data": null
}
I don't know how these values can be null if they...can't be null.
Copy code
query is:

{
  flow_run(where: {_and: [{state: {_eq: "Scheduled"}}, {id: {_is_null: false}}]}) {
    id
    name
    scheduled_start_time
    state
    parameters
    flow {
      id
      name
    }
  }
}
i was able to fix it by adding another where clause - where project name is not equal to "test", which is not a project that exists
k

Kevin Kho

06/02/2022, 6:45 PM
Trying this now
Am a bit confused. Does this raise the same error?
Copy code
{
  flow_run(where: {state: {_eq: "Scheduled"}}) {
    id
    name
  }
}
j

Jessica Smith

06/02/2022, 6:49 PM
that one does not, but if i add in the flow object it does
that's not what i would have expected, since the error references flow_run.id
it seems like any where clause referencing the flow object will fix the issue.
k

Kevin Kho

06/02/2022, 6:58 PM
So like this right?
Copy code
{
  flow_run(where: {state: {_eq: "Scheduled"}}) {
    id
    name
    flow{
      id
      name
    }
  }
}
That does seem like a bug. Could you DM me the tenant id and name?
j

Jessica Smith

06/02/2022, 7:00 PM
yep, that one throws the error
just DMd you
3 Views