From af9afe32cc1c3881c0fd6c62538df323eba47035 Mon Sep 17 00:00:00 2001 From: Kyrch Date: Mon, 16 Feb 2026 07:23:48 -0300 Subject: [PATCH] docs: update rate limiting to 90 queries per request (#127) --- .../examples/filter-by-external-site/index.md | 12 +++---- docs/graphql/guide/relationships/index.md | 32 +++++++------------ docs/graphql/intro/ratelimiting/index.md | 8 ++--- docs/graphql/migrating/index.md | 2 +- 4 files changed, 22 insertions(+), 32 deletions(-) diff --git a/docs/graphql/examples/filter-by-external-site/index.md b/docs/graphql/examples/filter-by-external-site/index.md index 9987905..6d9b5b8 100644 --- a/docs/graphql/examples/filter-by-external-site/index.md +++ b/docs/graphql/examples/filter-by-external-site/index.md @@ -13,7 +13,7 @@ An external resource may be linked to multiple anime. ## Query Example ```graphql -query ($id: Int!) { +query ($id: [Int!]) { findAnimeByExternalSite(site: ANILIST, id: $id) { name mediaFormat @@ -29,11 +29,11 @@ None ## Parameters -| Name | Type | Description | -| :---: | :-----------: | :------------------------------------------------------------------------ | -| site | ResourceSite! | The site enum used to filter. | -| id | Int | The id of the anime in the external site. Required if no `link` provided. | -| link | String | The URL of the external resource. Required if no `id` provided. | +| Name | Type | Description | +| :---: | :-----------: | :------------------------------------------------------------------------- | +| site | ResourceSite! | The site enum used to filter. | +| id | [Int!] | The ids of the anime on the external site. Required if no `link` provided. | +| link | String | The URL of the external resource. Required if no `id` provided. | ## Response diff --git a/docs/graphql/guide/relationships/index.md b/docs/graphql/guide/relationships/index.md index 8b60cde..cd239db 100644 --- a/docs/graphql/guide/relationships/index.md +++ b/docs/graphql/guide/relationships/index.md @@ -10,31 +10,20 @@ The AnimeThemes API implements relationships for most types, previously known as The many-to-many relationships apply connections. The one-to-many relationships apply simple pagination. -## One-to-Many (HasMany) +## One-to-Many A one-to-many relationship has a list of objects that reference the related type. - -```graphql -query { - anime(slug: "hibike_euphonium") { - name - animethemes(first: 2, type: OP) { - sequence - } - } -} -``` - -## Inverse One-to-Many (BelongsTo) - -An inverse one-to-many relationship has an object that references the foreign type. +And an inverse one-to-many relationship has a unique object that references the related type. ```graphql query { animethemePagination { data { sequence - anime { + animethemeentries(first: 1, version: 1) { # Inverse One-to-Many + version + } + anime { # One-to-Many name } } @@ -42,7 +31,7 @@ query { } ``` -## Many-to-Many (BelongsToMany) +## Many-to-Many Every many-to-many relationship applies connection pagination and has three top fields. Read about it in the [graphql.org](https://graphql.org/learn/pagination/#pagination-and-edges) @@ -112,7 +101,7 @@ will return the JSON: } ``` -## Polymorphic One-to-Many (MorphMany) +## Polymorphic One-to-Many The relationship of polymorphic one-to-many. Applies simple pagination. @@ -129,7 +118,7 @@ query { } ``` -## Polymorphic inverse One-to-Many (MorphTo) +## Polymorphic inverse One-to-Many The inverse type of polymorphic one-to-many. A union type indicates that a field might have multiple object types. @@ -139,6 +128,7 @@ query { performancePagination { data { artist { + __typename ... on Artist { name } @@ -156,7 +146,7 @@ query { } ``` -## Polymorphic Many-to-Many (MorphToMany) +## Polymorphic Many-to-Many The polymorphic many-to-many relationship uses the same strategy as the usual [many-to-many](#many-to-many-belongstomany). diff --git a/docs/graphql/intro/ratelimiting/index.md b/docs/graphql/intro/ratelimiting/index.md index 5ee56df..ff99491 100644 --- a/docs/graphql/intro/ratelimiting/index.md +++ b/docs/graphql/intro/ratelimiting/index.md @@ -12,14 +12,14 @@ Here we will provide an overview of managing request quotas. ## Response Headers -The AnimeThemes GraphQL API limits queries to 80 per minute. +The AnimeThemes GraphQL API limits queries to 90 per minute. The AnimeThemes API will return `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers in the response. ```sh ... -X-RateLimit-Limit: 80 -X-RateLimit-Remaining: 79 +X-RateLimit-Limit: 90 +X-RateLimit-Remaining: 89 ... ``` @@ -29,7 +29,7 @@ If the rate limit is exceeded, the AnimeThemes API will return `Retry-After` and ```sh ... -X-RateLimit-Limit: 80 +X-RateLimit-Limit: 90 X-RateLimit-Remaining: 0 Retry-After: 60 X-RateLimit-Reset: 1625073463180 diff --git a/docs/graphql/migrating/index.md b/docs/graphql/migrating/index.md index 2f7b8fb..d476fcc 100644 --- a/docs/graphql/migrating/index.md +++ b/docs/graphql/migrating/index.md @@ -44,7 +44,7 @@ For more information, see the [wiki section on performances and memberships](htt It is easy to confuse what a group is. They can be a group of animethemes (e.g. "English Version") or a group of artists (e.g. "Aqours"). -The `group` query/type does not exist. For a group of animethemes, the query is `themegroups`. For a group of artists, they are included globally in the `artists` query. +The `group` query/type does not exist. For a group of animethemes, the query is `themegroupPagination`. For a group of artists, they are included globally in the `artistPagination` query. ## Views Count Field Deprecated