Limits

To limit the amount of resources used by a single query, you can retrieve a maximum of 100,000 nodes in a single query. A query that can potentially return more than this limit is not executed and an error message is returned in the response:

{
  "errors": [
    {
      "message": "The query has exceeded the size limit. Your request is for 101000 fields, while the maximum limit is 100000 fields.",
      "locations": [
        {
          "line": -1,
          "column": -1
        }
      ],
      "extensions": {
        "classification": "ValidationError"
      }
    }
  ]
}

The number of nodes is calculated before executing the query and is based on limit parameters. The actual count of nodes that would be returned does not matter. This is to avoid that the query would succeed or fail depending on the data that is present in the system at a given point in time.

The number of nodes for a query is calculated as the number of root nodes multiplied by the total number of child nodes. The same calculation is applied recursively for each level of parent-child relationships in the query.

The following query can potentially return 135 nodes:

query {
    communities(limit: 3) {        # 135 = 3 + (3 * 44)
        name
        subCommunities(limit: 4) { # 44 = 4 + (4 * 10)
            name
            subDomains(limit: 5) { # 10 = 5 + (5 * 1)
                name
                createdBy {        # 1
                    firstName
                    lastName
                }
            }
        }
    }
}

If you don’t specify a limit, the default value of 10 applies. The size of the following query is 110 nodes:

query {
    communities {    # 110 = 10 + (10 * 10)
        name
        subDomains { # 10
            name
        }
    }
}