I have a question regarding the recent announcement that products will soon support up to 2048 variants.
In our application, we use the products/update webhook to track changes in variant fields. Currently, the webhook includes all 100 variants, so we don’t need to make any additional requests to fetch variant data.
Could you please clarify what the webhook payload will look like after this change? Will it contain all 2048 variants, or still only 100 variants as before? If it remains 100 variants, will they be sorted by the updatedAt field so that the webhook includes only the most recently updated variants?
Its documented under the new product model in the docs.
A variant_gids field will be retroactively added to all webhook versions. The field will list all variant GIDs in the format variant_gids: [{admin_graphql_api_id: ID!}].
Product webhooks will return a full variants payload for the first 100 records. For variants 101+, the payload won’t include the full variant details, but the variant_gids field will still be included for these variants.
I have a followup question on this: We also use the products/update webhook to track changes to variants and the webhook payloads we’re seeing don’t match the documentation.
We have tested this with products with up to 183 variants so far and we get: full variant data for all 183 variants in the variantsarray and also entries for all 183 variants in the variant_gids array.
To make matters more confusing, we can’t reproduce this behaviour in our staging Shopify shop.