AniList-Node
AniList-Node copied to clipboard
Allow Users to Grab the 26th+ Entry in a Query
Users are currently restricted by the first page of the related entries to many of the methods right now. The first page has 25 entries, as per AniList's limit, but it is possible to query for more entries. Users should have an optional parameter in methods to get the next 25+ entries if they wish.
For example:
One Piece has 53 related entries right now but with media.anime()
it is only possible to get 25 of those entries.
Because of the way the query is setup,
relations { nodes { id title { english native romaji userPreferred } type } }
will only ever return 25 entries.
While a change like this,
relations (page: x) { nodes { id title { english native romaji userPreferred } type } }
would allow users to query for other entries that would not be listed on other pages.
Each entry that grabs related entries (ie: characters & media) is a connection so those changes should work fine for the GraphQL queries.
Edit: Updated with more explanation and example.
As mentioned in the #anilist-node channel on Discord, this issue probably has to be put on hold until AniList supports pages for relations. At the time of writing you are not allowed to supply a page parameter and all page info entries are null