Skip to content
Discussion options

You must be logged in to vote

You can pass the whole where argument as a query variable:

query MyQuery ($where: product_bool_exp $limit: Int = 1000 $offset: Int = 0 $orderBy: [product_order_by!]) {
  product(where: $where, limit: $limit, offset: $offset, order_by: $orderBy) {
    title
  }
}

Then you pass the variables as you would expect:

{
  "where":{
    "_or": [
      {"category_id": {"_eq": 1}, "brand_id": {"_eq": 1}},
      {"category_id": {"_eq": 5}, "brand_id": {"_eq": 16}},
      {"category_id": {"_eq": 7}, "brand_id": {"_eq": 20}}
    ]
  },
  "limit": 1000,
  "offset": 0,
  "orderBy": [{"date": "desc"}]
}

I hope this helps

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@canali83
Comment options

Answer selected by BenoitRanque
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants