API limiting
To ensure optimal performance and fair usage, the Greyfinch GraphQL API implements the rate limits documented here. To help you keep track and stay within the limits, we send three HTTP response headers with every request.
Header | Description |
|---|---|
| how many requests the client can make |
| how many requests remain to the client in the timewindow |
| how many seconds must pass before the rate limit resets |
| if the max has been reached, the seconds the client must wait before they can make new requests |
Api request limits
These are the base limits, and are likely to change as the API develops.
Auth method | Number requests | Per | For |
|---|---|---|---|
Personal Access Token | 100 | User | 1 minute |
Unauthenticated | 100 | User | 1 minute |
This rate limit helps prevent excessive load on our servers and maintains a reliable service for all users. If you exceed this limit, you will receive a 429 Too Many Requests response status code. We recommend implementing retry mechanisms and handling these responses gracefully in your application.
For high-throughput needs, consider spreading out requests or batching operations where possible. If you consistently hit these limits and need a higher quota, please contact our support team to discuss potential adjustments or service plans that can accommodate your requirements.
Other limits
Each of these settings is designed to maintain the efficiency and security of the server by controlling how complex or large the queries can be, ensuring that the system remains responsive and stable.
Name | Description | Limit |
|---|---|---|
Max Tokens | This setting restricts the number of individual elements (like fields, types, and values) that can be included in a single GraphQL query. This limitation helps prevent server overload by avoiding excessively large or complex queries that could slow down or crash the system. | 1000 tokens |
Max aliases | This plugin limits the number of aliases you can use in a GraphQL query. Aliases let you rename the result of a field to something more convenient, but using too many can make queries overly complicated and harder to process efficiently | 15 aliases |
Character limit | This setting caps the total number of characters that a query can contain. By setting a maximum length, it helps prevent denial-of-service (DoS) attacks that might occur if someone tries to overload the system with extremely long queries. | 15,000 characters |
Max Depth | This plugin limits the depth of queries to a specified number of nested levels. This prevents clients from requesting deeply nested data, which can lead to performance issues such as excessive load times or server strain because of the large amount of data being fetched all at once. | 6 levels |
Cost limits | This setting controls the computational cost of processing a query. It assigns different costs to different types of operations (like fetching objects or fields), and the total cost of a query must not exceed the set limit. This prevents overly complex queries that could degrade server performance. | Max Cost: 5000, Object Cost: 2, Scalar Cost: 1, Depth Cost Factor: 1.5 |