API Stability Short-Term

The queryQuotaUsage() GraphQL query returns the query quota usage for a particular user.

For more information on query quotas, see the Query Quotas documentation page.

Syntax

Below is the syntax for the queryQuotaUsage() query field:

graphql
queryQuotaUsage(
     username: string!
   ): [QueryQuotaUsage!]!

There's only one input, the username. The return datatype is described in the Returned Datatypes section. Here's an example of how this query field might be used:

Show:
graphql
query {
  queryQuotaUsage(
  username: "bob@company.com"
  ) {interval, staticCost, liveCost, queryCount}
}
Example Responses
Show:
json
{
  "data": {
    "queryQuotaUsage": [
      {
        "interval": "PerHour",
        "staticCost": 68,
        "liveCost": 0,
        "queryCount": 3
      },
      {
        "interval": "PerDay",
        "staticCost": 68,
        "liveCost": 0,
        "queryCount": 3
      }
    ]
  }
}

Returned Datatypes

The queryQuotaUsage() has a few parameters. Below is a list of them along with a description of each:

Table: QueryQuotaUsage

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Mar 19, 2025
liveCostlongyes Short-TermThe permitted amount of live cost points, a combination of both memory and CPU consumption by the query.
queryCountintegeryes Short-TermThe number of queries.
staticCostlongyes Short-TermThe permitted amount of static cost points, a combination of both memory and CPU consumption by the query.