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

Ken Nguyen

03/24/2022, 4:29 PM
Is there a way I can use
version_group_id
instead of
flow_id
in my GQL query? I tried to simply swap out
flow_id
for
version_group_id
, but that’s giving me the following error
discourse 1
k

Kevin Kho

03/24/2022, 4:31 PM
What is the original query here?
k

Ken Nguyen

03/24/2022, 4:35 PM
Silly me providing no context again, here it is:
Copy code
query {
  flow_run (
    where: {flow_id: {_eq: "[FLOW_ID]"}}
    order_by: {state_timestamp: desc}
    limit: 1
    offset: 0
  ){
    name
    flow_id
    flow {
      name
      id
    }
    logs {
      message
      created
    }
  }
}
Also some follow up questions: 1. What is the difference between Flow Group ID and Version Group ID? I see that Flow ID changes between different versions, but both of the other ones have remained the same. 2. Is it safe to share flow ids publicly?
k

Kevin Kho

03/24/2022, 4:39 PM
Flow group ID is just for backward compatibility. Yes it actually is
k

Ken Nguyen

03/24/2022, 4:41 PM
Good to know!
k

Kevin Kho

03/24/2022, 4:43 PM
Copy code
query {
  flow_run (
    where: {flow: {version_group_id: {_eq: "e49fde24-f2b0-4b7d-a653-fabcd774ac67"}}}
    order_by: {state_timestamp: desc}
    limit: 1
    offset: 0
  ){
    name
    flow_id
    flow{
      name
      id
      version_group_id
    }
    logs {
      message
      created
    }
  }
}
k

Ken Nguyen

03/24/2022, 4:48 PM
Amazing, that works great! I tried looking for documentation for things like this but couldn’t find any, did I overlook anywhere?
k

Kevin Kho

03/24/2022, 4:50 PM
No….unless you wanna a GraphQL tutorial. I thought Hasura had one but I can’t find it now. I haven’t read any though, I think you just kinda pick it up. Sometimes though, I check the UI repo and see how a certain frontend page queries the backend
🙌 1
k

Ken Nguyen

03/24/2022, 4:51 PM
Good idea
6 Views