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 your feature request related to a problem? Please describe.
In the GraphQL API, the Product.variants field returns an array of all variants.
If a product has more than 100 variants this causes 2 issues:
You run into the apiOptions.shopListQueryLimit of 100, since behind the scenes the resolver makes use of the ListQueryBuilder (source). This means you then need to raise the limit in order to fetch all items in the storefront, or create a custom query to do so.
In the Admin UI, loading the product detail view becomes slow. Having to join and send all the required related data for a product with ~300 variants took multiple seconds in my testing, where it is usually near-instant.
Describe the solution you'd like
Expose a new field on the Product type which implements the PaginatedList interface, allowing you to specify take, skip and even the usual sort and filter params.
We want this to be backwards-compatible, so we cannot just replace the existing variants field. We'll have to name it something else, such as variantsList. Not ideal since it breaks the naming convention, but we can fully replace the variants field in v2.0 and then deprecate variantsList.
The Admin UI will also be updated to use this new field and do proper server-side pagination rather than the purely client-side solution that was introduced in #411.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In the GraphQL API, the
Product.variants
field returns an array of all variants.If a product has more than 100 variants this causes 2 issues:
apiOptions.shopListQueryLimit
of 100, since behind the scenes the resolver makes use of the ListQueryBuilder (source). This means you then need to raise the limit in order to fetch all items in the storefront, or create a custom query to do so.Describe the solution you'd like
Expose a new field on the
Product
type which implements thePaginatedList
interface, allowing you to specifytake
,skip
and even the usual sort and filter params.We want this to be backwards-compatible, so we cannot just replace the existing
variants
field. We'll have to name it something else, such asvariantsList
. Not ideal since it breaks the naming convention, but we can fully replace thevariants
field in v2.0 and then deprecatevariantsList
.The Admin UI will also be updated to use this new field and do proper server-side pagination rather than the purely client-side solution that was introduced in #411.
The text was updated successfully, but these errors were encountered: