productCounts query limitation

Shopify recently sent reminder emails stating, “As of February 1, 2025, all public apps must be built using the new GraphQL product APIs.” However, it’s worth reminding Shopify that without support for basic queries like total resource counts, it’s impossible to fully migrate from REST :eyes:

This functionality is essential for many apps, and its absence blocks migration. We urge Shopify to address this gap to ensure developers can transition smoothly.

2 Likes

Hi there,

we are less than one month ahead to perform this mandatory change, but the issue with the count limit is still there. Any news on this topic?

If there is no solution planned, at least Shopify could delay the obligation of this change (at least only for the /products/count endpoint).

3 Likes

The same expectations apply to the variants/count endpoint as well, because the replacement GraphQL is buggy and returns incorrect results.

The variant count endpoint isn’t imposed by the same limit:

1 Like

Hey folks - reconnecting with the product team on this one, will update when I hear more.

3 Likes

@Luke, the issue is that the productVariantsCount GraphQL call returns incorrect results. The example you shared here isn’t just about one store; it’s returning incorrect results for many stores. This is why, until Shopify provides a reliable way for us to get accurate counts, we need the old endpoints to remain active. Below are a few examples I ran a few minutes ago for our existing customer base. It returns incorrect results for nearly 25% of our customer base.

  • GQL: The new GraphQL productVariantsCount
  • API: The variants/count.json endpoint
  • DB: Our real-time synced database

To protect customer privacy, I’ve removed domain names. A difference of 1,500 is significant:

  1. xyz.myshopify.comPrecision: EXACT
    GQL*: 4762 | API: 3260 | DB: 3260
  2. xyz.myshopify.comPrecision: EXACT
    GQL*: 1434 | API: 1272 | DB: 1272
  3. xyz.myshopify.comPrecision: EXACT
    GQL*: 2015 | API: 1776 | DB: 1776

Well, it’s a great day to be a Shopify developer! We just received a cheerful email reminding us that we have exactly 24 days before Shopify removes our app from the App Store unless we migrate to GraphQL. The only tiny issue? The functionality we need to migrate still doesn’t exist! :upside_down_face:

Nothing quite like a ticking clock and a missing API endpoint to keep things exciting. Thanks, Shopify, for the extra motivation! :tada:

P.S. This situation is not funny at all, and it creates unnecessary frustration for developers.

As another use case for unfiltered counts, we have a use case that requires occasionally reading through all of a user’s products (often on the scale of 100k-300k products).

We do this 100 products per request and use the total count to determine request as a count of requests processed (e.g. page 1768/2717).

Our user’s data is sparse in any filterable property (sometimes >10k products were created in just a few minutes, and sometimes 10k product creations are spreadh across a few months.

Without a simple, total count, we cannot give progress updates or completion estimates.

We do not need exact counts (off by a couple thousand would be fine) and we do not need filters.

Hi all - I’m happy to share we’ve shipped unlimited productCount without filters to all available versions. cc @Kirill_Platonov

@merchbees - we’re investigating the inaccurate productVariantsCount results. We appreciate you reporting it.

@256_agent re: email reminder

Sorry for any confusion. You received an automated quarterly notification email letting partners know of any calls to APIs with breaking changes. Apps that are using the REST product APIs specifically won’t be delisted on Feb 1 and the REST API will continue to function. However, it is important to migrate by the deadline to ensure merchants using your app do not have a downgraded experience when interacting with products that have 100+ variants.

10 Likes

@Tim-Shopify thank you for this update! :clap: I’ll try it out on some large clients and get back with feedback.

The warning about limit in docs needs to be changed:

The note about delisting is very important too!

2 Likes

Tested on a merchant with 1.5M+ products. Works well now! :fire:

2 Likes

Thanks, Tim!

This is fantastic news. Unlimited productCount without filters really solves the issue for us. Appreciate the quick action and clarification. Now everything truly feels okay! :blush:

2 Likes

Great news! As commented above, this limit issue also happens with GraphQL orders count (ordersCount - GraphQL Admin). Is it planned to solve in the same way?

@sinuhe We’re actively working on a platform solution for all count queries. Aiming to get to no cap (or a much much higher number) inclusive of filters. We will share more as we make progress on that (likely before the 2025-04 API release)

6 Likes

Please add collectionsCount to the list as well. collectionsCount - GraphQL Admin

1 Like

Hey @Tim-Shopify !
Do you guys have any plans to do the same with orders count? (enabling unlimited productCount without filters)

We are currently working on an implementation to go around the 10k limitation… but having this would simplify everything.

We know it is available on the rest API, but we are avoiding using it, since it is now legacy.

Thanks!

Hey @vitor-smile - we’re currently investigating how to remove the 10k limit across the graphql api (including orders). We don’t have a timeline yet so one option is to continue to use the orders count via rest for now until we’re able to adjust the limit.

Hi @Tim-Shopify

I appreciate your earlier updates in this thread, however I have another few questions. I understand we can still use REST after Feb 1 as long as our apps properly handle large number of variants, however I’d like to point that the issue is not quite solved for us as we need unlimited productsCount with filters, our use case is to count all published products:

productsCount(query: "published_status:published") {
    count
    precision
}

Another related use case we still have implemented as a REST call is counting products in a particular collection – is there any chance this will be implemented as part of a productsCount call?

1 Like

@Tim-Shopify it seems like Shopify temporarily did as you said they would and then changed their minds.

The “Fix by” warnings went away when I checked about a week ago and then came back recently.

Hi @chrismgala

We had to make some changes to our tracking of API calls in order to prevent merchants from receiving “unsupported” notifications for unmigrated apps making . This temporarily removed the notifications from the API health dashboard as well – as you noted, but they returned last week.

1 Like