https://prefect.io logo
c

Constantino Schillebeeckx

03/17/2022, 7:56 PM
I'd like to excute a graphQL with this kind of predicate:
Copy code
{parameters: {_contains: {"foo": "bar"}},
but the syntax isn't quite right, I get the error
Copy code
Syntax Error: Expected Name, found String "date".
can someone help?
k

Kevin Kho

03/17/2022, 8:00 PM
Will try this myself
c

Constantino Schillebeeckx

03/17/2022, 8:12 PM
I think I figured it out:
Copy code
{parameters: {_contains: {"boo: bar}},
k

Kevin Kho

03/17/2022, 8:13 PM
Ah ok was gonna say
_has_key
might be better but yeah this thread is good
❤️ 1
l

Leanna Morinishi

03/28/2022, 5:47 PM
Did this end up working for you? It looks like it’s still open and I can’t get this to query as expected:
Copy code
query {
  flow (
    where: {parameters: {_has_key: "mykey"}}
  ) {
      name
      created_by {email}
      parameters 
    }
}
k

Kevin Kho

03/28/2022, 5:52 PM
What is the output without the where clause here? Do you see the parameters you are expecting?
gratitude thank you 1
l

Leanna Morinishi

03/28/2022, 5:57 PM
I needed to query
flow_run
not
flow
🤦🏻‍♀️
It works now
FYI for future slack searchers finding their way here, results when querying
flow
looked like
Copy code
{
  "data": {
    "flow": []
  }
}
which was not expected!
k

Kevin Kho

03/28/2022, 6:00 PM
Ah ok sounds good! Glad you got that figured out!