Skip to main content

Hello All,

I am trying to query the FDM schema after populating (listForecast in slb-pdf project). But i am getting the error! seems like an bug. Can you check if I am doing something wrong.

query MyQuery {
  listForecast(filter: {oilRate: {eq: 1.5}, and: {gasRate: {eq: 1.5}}}) {
    edges {
      node {
        id
      }
    }
  }
}

 

Error I am getting is as below. Can you help if known bug or if I should do differently?
 "message": "Expected either 'and', 'or', 'not' or a single field condition used in the same filter block.",

Hi,

Your query syntax is not correct. I think if you want the and condition on both oil Rate and gasRate it should be:
filter: { and: [{oilRate: {eq: 1.5}}, {gasRate:{eq:1.5}}]}


Thanks Vu Hai Nguyen, I was using the UI to built the query but did not worked somehow.
Thanks for your input, it works!


We are working on making the filter builder to be more robust to capture this ability to build “list” of `and` and `or` filters 🙂 Hope the workaround in code will work in the mean time!


Reply