Documentation Center

Complex GraphQL query filter expressions

Use logical operators AND and OR to combine two simple filters into a new, complex one.

A complex filter expression consists of two (simple or complex) filter expressions being joined by an AND or an OR operator:
Complex AND expression
To create a complex AND expression, define a filter expression as {F1, and: {F2}}, where both F1 and F2 are simple filter expressions. This results in the query being executed with both filters applied.
Complex OR expression
To create a complex OR expression, define a filter expression as {F1, or: {F2}, where both F1 and F2 are simple filter expressions. This results in the query being executed with either filter (or both) applied.
Expressions with more than two operands
If your Boolean expression has more than two operands, use groupBy to form a complex filter AND or OR expression, then combine the result using AND or OR. For example, joining three simple filter expressions into a three-operand AND expression follows the syntax: {groupBy: {F1, and: {F2}}, and: {F3}}