You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue or pull request for this?
I have searched the existing issues and pull requests
Feature description
Currently the response of getAllPokemon is, by default, not paginated. This sets a hard limit on how much data can be returned defined by the string limit that the v8 engine can handle (~1GB). At the time of writing (2023-15-12) with the data from Scarlet & Violet Indigo Disk the full JSON is ~524 MB. This size will ever only increase as time goes on and more Pokémon are released. Furthermore, this limit also blocks the expansion of further nesting data, such as changing otherFormes to be proper Pokemon references as opposed to just species strings.
Important
This change would be a breaking change because the response of getAllPokemon would drastically change.
Desired solution
To resolve this issue the response from getAllPokemon should be paginated by default. The following rules will be applied:
If no pagination options are provided by the user the default amount per page of 250 is used
Input validation will ensure the user can never request more than 250 Pokémon per page
The following interface will be used for a paged response:
interfacePaginatedResponse{data: TheOldDataObject;totalCount: number;// The total count of resultspages: number;// The total amount of pages based on taken and totalCountpage: number;// The current page numberoffsetForCurrentPage: number;// The offset provided for this requestoffsetNextPage: number;// The offset to provide to jump to the next pagetaken: number;// The amount taken (length of data)}
Alternatives considered
Migrating to a different programming language than TypeScript that doesn't have the 1GB limit that v8 does. This however is only delaying the inevitable because at some point any programming language is going to run out of space.
Additional context
#899 where otherFormes nesting was added as an attempt to provide more data to the end-user
Is there an existing issue or pull request for this?
Feature description
Currently the response of
getAllPokemonis, by default, not paginated. This sets a hard limit on how much data can be returned defined by the string limit that the v8 engine can handle (~1GB). At the time of writing (2023-15-12) with the data from Scarlet & Violet Indigo Disk the full JSON is ~524 MB. This size will ever only increase as time goes on and more Pokémon are released. Furthermore, this limit also blocks the expansion of further nesting data, such as changingotherFormesto be properPokemonreferences as opposed to just species strings.Important
This change would be a breaking change because the response of
getAllPokemonwould drastically change.Desired solution
To resolve this issue the response from
getAllPokemonshould be paginated by default. The following rules will be applied:Alternatives considered
Additional context
#899 where
otherFormesnesting was added as an attempt to provide more data to the end-user