Ran into this just a few days ago as well.
Here is my write-up about it: Exceeded maximum number of unique handles for metaobject handle
tl;dr
- the limit of 20 seems to include all unique handle lookups on the same page
- including lookups for other metaobjects
- including lookups for metafields
- not well documented
- the error message is misleading
- maybe the limit for pagination is now higher than before: New pagination limits for Liquid & Storefront GraphQL API - Shopify developer changelog
- it was 250 and 1000 for some time
- using
.values_countallows you to define the limit dynamically to the amount of metaobject entries
However, it is interesting, that you could query more metaobject entries, when you switched to a different metaobject definition ![]()