https://prefect.io logo
#prefect-server
Title
# prefect-server
s

Stéphan Taljaard

12/15/2021, 8:27 PM
Hi. Is there a GraphQL query I can do to get the default results location?
k

Kevin Kho

12/15/2021, 8:36 PM
Try this, but I’m not sure it will work
Copy code
query{
   flow_run_state{
    id
    state
    result
  }
}
s

Stéphan Taljaard

12/15/2021, 8:43 PM
That doesn't really work. Here's what I have currently, which I want to run within a flow:
Copy code
ctx = prefect.context
cfg = ctx.get("config")
home_dir = cfg["home_dir"]
results_dir = f"{home_dir}\results"
Which only works for the default location (and should work for me)
k

Kevin Kho

12/15/2021, 8:47 PM
I suspect it’ll be here:
Copy code
query{
   flow {
    serialized_flow
  }
}
but there’s a lot of stuff in there
Have not seen you here for a while btw lol
s

Stéphan Taljaard

12/15/2021, 8:51 PM
Yeah things have been way to busy at work the last while End of the year + people leaving = I couldn't really focus on Prefect Next year things will go better, I hope
a

Anna Geller

12/15/2021, 9:10 PM
@Stéphan Taljaard I don’t think we expose this via GraphQL. Can you perhaps define it as a global variable and use this way? Linking this thread since it’s related
🙌 1
2 Views