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. Queries are limited to 100 queries per minute and mutations are limited to 300 per minute. A good rule of thumb is to avoid more than 100 requests a 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.