Request cost calculation for QueryRoot->nodes field

Highlighted
New Member
2 0 0

While playing around with different ways to query product metafields, I discovered something that I can't quite wrap my head around. I'm using a query that looks something like this:

{
    nodes(ids:[...]) {
        ... on Product {
            id
            legacyResourceId
            metafields(first:250) {
                edges {
                    node {
                        key
                        namespace
                        value
                    }
                }
                pageInfo {
                    hasNextPage
                }
            }
        }
    }
}

The strange thing is the costs of this request don't seem to change as I continue adding more IDs. With any other query structure to get the same data, I quickly run into the request cost limit of 1000, but here I have no such problem at all. If this were intended, it would be great, but I'm suspicious about it actually being a bug. Does anyone know whether this behavior is correct or not?

0 Likes
Shopify Partner
918 17 158

Oooh, nice find! Seems the regular 250 items limit isn't there and they simply pin the cost to 253. Eventually you hit the limit of 951 query params. Still nice to know this one's so cheap - thanks for sharing!

I turn coffee in to code - since 1998
0 Likes