When you pull Shopify products over GraphQL, always paginate. Request with first set to at most 250 and follow the pageInfo cursors until hasNextPage is false. There is no total count shortcut that replaces this, so agents should loop the cursor walk rather than retrying a bigger single query.

Context: Stack Overflow #66185620 (accepted answer, 13 votes): the asker tried to fetch all products in one GraphQL query and hit must provide first or last errors. The accepted answer: neither the Storefront nor the Admin GraphQL API returns everything in one request. Pass first up to 250 and walk the cursor pagination for larger catalogs.