Skip to content
Developerhome
Sage Distribution and Manufacturing Operations

And and Or

  Less than to read

You can use the _and and _or operators to show results with multiple filters applied.

The following tables display examples and results of applying filters with _and and _or operators. Some of the fields displayed are not mandatory and others have been omitted.

{
  xtremMasterData {
    customer {
      query(filter: "{_or:[{currency:{id:'EUR'}},{currency:{id:'GBP'}}]}") {
        edges {
          node {
            name
            currency{
              id
            }
            country {
              name
              language
            }
          }
        }
      }
    }
  }
}
{
  "data": {
    "xtremMasterData": {
      "customer": {
        "query": {
          "edges": [
            {
              "node": {
                "name": "Distributor",
                "currency": {
                  "id": "GBP"
                },
                "country": {
                  "name": "United Kingdom",
                  "language": "English"
                }
              }
            },
            {
              "node": {
                "name": "PITCH SA",
                "currency": {
                  "id": "EUR"
                },
                "country": {
                  "name": "France",
                  "language": "French"
                }
              }
            }
          ]
        }
      }
    }
  }
}
{
  xtremMasterData {
    customer {
      query(filter: "{category:{_ne:null},currency:{id:'EUR'}}") {
        edges {
          node {
            name
            category{
              id
  
            }
            currency{
              id
            }
            country {
              name
              language
            }
          }
        }
      }
    }
  }
}
{
  "data": {
    "xtremMasterData": {
      "customer": {
        "query": {
          "edges": [
            {
              "node": {
                "name": "PITCH SA",
                "category": {
                  "id": "CUST"
                },
                "currency": {
                  "id": "EUR"
                },
                "country": {
                  "name": "France",
                  "language": "French"
                }
              }
            },
            {
              "node": {
                "name": "ATSERMO",
                "category": {
                  "id": "Food&Bev"
                },
                "currency": {
                  "id": "EUR"
                }
              }
            }
          ]
        }
      }
    }
  }
}