Skip to content
Developerhome

At least and At most

  Less than to read

_atLeast restricts the minimum number of records that may be impacted.

The following tables display an example of a query using the _atLeast filter. Some of the fields displayed are not mandatory and others have been omitted.

{
  xtremMasterData{
    item{
      query (filter : "{ itemSites: {_atLeast: 5}}") {
        edges {
          node {
            id
            name
            itemSites{
              query {
                totalCount
              }
            }
          }
        }
      }
    }
  }
}
{
    "data": {
        "xtremMasterData": {
            "item": {
                "query": {
                    "edges": [
                        {
                            "node": {
                                "id": "3847TY7",
                                "name": "Pressure sensor",
                                "itemSites": {
                                    "query": {
                                    "totalCount": 8
                                    }
                                }
                            }
                        },
                        {
                            "node": {
                                "id": "AB-1200",
                                "name": "Electrical connector",
                                    "itemSites": {
                                    "query": {
                                        "totalCount": 5
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
}

_atMost restricts the maximum number of records that may be impacted.

The following tables display an example of a query using the _atMost filter. Some of the fields displayed are not mandatory and others have been omitted.

{
  xtremMasterData{
    item{
      query (filter : "{ itemSites: {_atMost: 5}}") {
        edges {
          node {
            id
            name
            itemSites{
              query {
                totalCount
              }
            }
          }
        }
      }
    }
  }
}
{
    "data": {
        "xtremMasterData": {
            "item": {
                "query": {
                    "edges": [
                        {
                            "node": {
                                "id": "001",
                                "name": "Coffee Beans",
                                "itemSites": {
                                    "query": {
                                        "totalCount": 1
                                    }
                                }
                            }
                        },
                        {
                            "node": {
                                "id": "10",
                                "name": "myTest",
                                "itemSites": {
                                    "query": {
                                        "totalCount": 1
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
}

The following tables display examples of queries where conditions are applied with the _atLeast and _atMost filter. Some of the fields displayed are not mandatory and others have been omitted.

{
  xtremMasterData{
    item{
      query (filter : "{ itemSites: {_atMost: 1,stockUnit:{id:'EACH'}}}") {
        edges {
          node {
            id
            name
            itemSites{
              query {
                edges{
                  node{
                    stockUnit {
                      id
                    }
                  }
                }
                
              }
            }
          }
        }
      }
    }
  }
}
{
    "data": {
        "xtremMasterData": {
            "item": {
                "query": {
                    "edges": [
                        {
                            "node": {
                                "id": "001",
                                "name": "Coffee Beans",
                                "itemSites": {
                                    "query": {
                                        "edges": [
                                            {
                                                "node": {
                                                    "stockUnit": {
                                                        "id": "EACH"
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
}
{
  xtremMasterData{
    item{
      query (filter : "{ itemSites: {_atMost: 1,stockUnit:{id:'EACH'}}}") {
        edges {
          node {
            id
            name
            itemSites{
              query {
                edges{
                  node{
                    stockUnit {
                      id
                    }
                  }
                }
                
              }
            }
          }
        }
      }
    }
  }
}

{
    "data": {
        "xtremMasterData": {
            "item": {
                "query": {
                    "edges": [
                        {
                            "node": {
                                "id": "001",
                                "name": "Coffee Beans",
                                "itemSites": {
                                    "query": {
                                        "edges": [
                                            {
                                                "node": {
                                                    "stockUnit": {
                                                        "id": "EACH"
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    ]
                }
            }
        }
    }
}