Pagination enforcement
Certain connections require afirst or last argument to be passed in to avoid massive fan-out queries. For these types of queries, you will encounter an error indicating that you must set a page size that is under a certain number. For more details about pagination and GraphQL, please consult this guide.
Rate limit
There are simple frequency limitations placed on the Arize GraphQL API to avoid abusive behavior. Limits apply per API key over a one-minute window, with queries and mutations counted separately. The exact limits depend on your account; contact support if your workload needs more. Self-hosted deployments set the limit with a single configuration value, described in Programmatic interface limits and capacity. When you exceed a limit the response is a GraphQL error withextensions.code set to TOO_MANY_REQUESTS. Rejected requests do not count against the window, so backing off and retrying loses nothing. A good rule of thumb is to spread requests evenly across the minute and to avoid massive parallel jobs.
Complexity limit
With GraphQL, one query can replace multiple. A single complex GraphQL query could return data equivalent to thousands of REST requests. This means the query rate limit does not sufficiently represent the computational costs on our servers. To accurately represent the server cost of a query, the GraphQL API calculates a callās complexity score based on the query itself. As long as your query falls under our complexity cost limit of 1000, you can execute this level of query. Check the complexity limit and cost for a given query in the explorer by specifying therateLimit node.
Calculating complexity
Note: The minimum cost of a call to the GraphQL API is 1, representing a single request.
- Each node equates to 1 complexity point. This includes the estimated nodes returned from connections.
- Each node field defaults to 1 complexity point.
1 Space node + 1 Space field (name) + (50 Monitors X 5 Monitor Fields (name, threshold, status, edges, node )
Total Query Cost = 252
Returning a callās complexity cost
With the GraphQL API, you can check the complexity cost for a given query by querying fields on therateLimit object:
-
The
limitfield returns the maximum number of points the client is permitted to consume for a given call -
The
costfield returns the point cost for the current call
Having trouble? Reach out to us via email support@arize.com or Slack us in the #arize-support channel for more support.