diff options
Diffstat (limited to 'doc/api/graphql/index.md')
-rw-r--r-- | doc/api/graphql/index.md | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/doc/api/graphql/index.md b/doc/api/graphql/index.md index 45a327d323b..7a68b1cdf16 100644 --- a/doc/api/graphql/index.md +++ b/doc/api/graphql/index.md @@ -48,7 +48,7 @@ libraries](https://graphql.org/code/#graphql-clients) to consume the API and avoid manual parsing. Since there's no fixed endpoints and data model, new abilities can be -added to the API without creating breaking changes. This allows us to +added to the API without creating [breaking changes](../../development/contributing/#breaking-changes). This allows us to have a versionless API as described in [the GraphQL documentation](https://graphql.org/learn/best-practices/#versioning). @@ -117,6 +117,43 @@ information about multiplexed queries is also available for [GraphQL Ruby](https://graphql-ruby.org/queries/multiplex.html), the library GitLab uses on the backend. +## Limits + +The following limits apply to the GitLab GraphQL API. + +### Max page size + +By default, connections return at most `100` records ("nodes") per page, +and this limit applies to most connections in the API. Particular connections +may have different max page size limits that are higher or lower. + +### Max query complexity + +The GitLab GraphQL API scores the _complexity_ of a query. Generally, larger +queries will have a higher complexity score. This limit is designed to protect +the API from performing queries that could negatively impact its overall performance. + +The complexity of a single query is limited to a maximum of: + +- `200` for unauthenticated requests. +- `250` for authenticated requests. + +There is no way to discover the complexity of a query except by exceeding the limit. + +If a query exceeds the complexity limit an error message response will +be returned. + +In general, each field in a query will add `1` to the complexity score, although +this can be higher or lower for particular fields. Sometimes the addition of +certain arguments may also increase the complexity of a query. + +The complexity limits may be revised in future, and additionally, the complexity +of a query may be altered. + +### Request timeout + +Requests time out at 30 seconds. + ## Reference The GitLab GraphQL reference [is available](reference/index.md). |