<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm" -->

---
title: Dynamic complexity cost for metafieldsSet mutation
description: Shopify's metafieldsSet GraphQL mutation now uses dynamic complexity costing instead of a flat 10-point charge. The new cost formula adds a weight per distinct...
canonical: https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Dynamic complexity cost for metafieldsSet mutation | daily.dev
og:description: Shopify's metafieldsSet GraphQL mutation now uses dynamic complexity costing instead of a flat 10-point charge. The new cost formula adds a weight per distinct...
og:url: https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm
og:image: https://api.daily.dev/og/posts/HFeh8aDrm.png
og:image:alt: Dynamic complexity cost for metafieldsSet mutation
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic complexity cost for metafieldsSet mutation

**[Shopify Developer changelog](https://daily.dev/sources/shopifychangelog)** · 5 min read · 0 upvotes · 0 comments

## Summary

Shopify's metafieldsSet GraphQL mutation now uses dynamic complexity costing instead of a flat 10-point charge. The new cost formula adds a weight per distinct resource owner touched (Order=10, Product=4, ProductVariant=2, Collection/Customer/Shop=1, others=0), while multiple metafields on the same owner within one call remain free. Most single-resource apps see little change, but high-fan-out requests across many owners (e.g., 25 distinct orders) can jump from 10 to 260 points. The change is meant to align cost with the actual downstream work (webhooks, cache invalidation, reindexing) triggered per distinct resource. Shopify recommends batching metafield writes by owner rather than splitting calls, and checking the extensions.cost field to monitor charges.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://shopify.dev/changelog/dynamic-complexity-cost-for-metafieldsset-mutation>

## Questions this post answers

### How does Shopify calculate the query cost for the metafieldsSet mutation now?

The cost is 10 base points plus a sum over distinct resource owners of that owner type's weight: Order=10, Product=4, ProductVariant=2, Collection=1, Customer=1, Shop=1, and 0 for all other owner types. Each distinct owner counts once per mutation invocation regardless of how many metafields are set on it, so setting 10 metafields on one product costs the same as setting one.

_Teams tuning Shopify app rate-limit usage can track API changes like this via daily.dev._

### What is the maximum possible cost for a single metafieldsSet call in Shopify's Admin GraphQL API?

The maximum cost for one metafieldsSet invocation is 260 points, reached by setting metafields on 25 distinct orders since the mutation accepts at most 25 metafields per call and Order has the highest weight of 10. The formula is 10 base points plus 25 times 10 (10 + 25×10 = 260).

_Developers estimating GraphQL rate-limit budgets can follow platform cost changes like this on daily.dev._

### How should I batch Shopify metafieldsSet calls to avoid hitting rate limits under the new dynamic cost model?

Group metafields by owner rather than splitting requests, since additional metafields on the same resource are free but every call still pays the flat 10-point base cost. Splitting one request across 25 orders into 25 separate requests costs far more overall than sending them together, so batch writes per distinct resource and check the extensions.cost field to verify the actual charge.

_Developers optimizing GraphQL request batching strategies can find changes like this through daily.dev._

## Similar posts on daily.dev

- [Advanced Metafield & Metaobject Querying](https://daily.dev/posts/advanced-metafield-metaobject-querying-quwsdmcne) · Shopify Developer changelog · 0 upvotes · 0 comments
- [Reduced metafield value sizes](https://daily.dev/posts/reduced-metafield-value-sizes-i7i45lclr) · Shopify Developer changelog · 1 upvotes · 1 comments
- [Shopify Reports 15X Faster Graphql Execution with Breadth First Engine](https://daily.dev/posts/shopify-reports-15x-faster-graphql-execution-with-breadth-first-engine-0xn3kh03q) · InfoQ · 1 upvotes · 0 comments
- [Invalid metafield queries now return errors in the GraphQL Admin API](https://daily.dev/posts/invalid-metafield-queries-now-return-errors-in-the-graphql-admin-api-sohgl4b9o) · Shopify Developer changelog · 0 upvotes · 0 comments
- [Define and set metafields on inventory transfers in the GraphQL Admin API](https://daily.dev/posts/define-and-set-metafields-on-inventory-transfers-in-the-graphql-admin-api-hvgcmhokt) · Shopify Developer changelog · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#backend](https://daily.dev/tags/backend), [#graphql](https://daily.dev/tags/graphql), [#shopify](https://daily.dev/tags/shopify)

[View this post on daily.dev](https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Dynamic complexity cost for metafieldsSet mutation","url":"https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm"},"datePublished":"2026-09-15T16:08:25.796Z","dateModified":"2026-09-15T16:08:51.802Z","description":"Shopify's metafieldsSet GraphQL mutation now uses dynamic complexity costing instead of a flat 10-point charge. The new cost formula adds a weight per distinct...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a5b9f0de82c011d79696b4f6b99b7364?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a5b9f0de82c011d79696b4f6b99b7364?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Shopify Developer changelog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Shopify Developer changelog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/aefcb5d2c1ca4b45b5d2256b9e2a9cc3","url":"https://daily.dev/sources/shopifychangelog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,backend,graphql,shopify","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Shopify Developer changelog","item":"https://daily.dev/sources/shopifychangelog"},{"@type":"ListItem","position":3,"name":"Dynamic complexity cost for metafieldsSet mutation"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/dynamic-complexity-cost-for-metafieldsset-mutation-hfeh8adrm#faq","mainEntity":[{"@type":"Question","name":"How does Shopify calculate the query cost for the metafieldsSet mutation now?","acceptedAnswer":{"@type":"Answer","text":"The cost is 10 base points plus a sum over distinct resource owners of that owner type's weight: Order=10, Product=4, ProductVariant=2, Collection=1, Customer=1, Shop=1, and 0 for all other owner types. Each distinct owner counts once per mutation invocation regardless of how many metafields are set on it, so setting 10 metafields on one product costs the same as setting one. Teams tuning Shopify app rate-limit usage can track API changes like this via daily.dev."}},{"@type":"Question","name":"What is the maximum possible cost for a single metafieldsSet call in Shopify's Admin GraphQL API?","acceptedAnswer":{"@type":"Answer","text":"The maximum cost for one metafieldsSet invocation is 260 points, reached by setting metafields on 25 distinct orders since the mutation accepts at most 25 metafields per call and Order has the highest weight of 10. The formula is 10 base points plus 25 times 10 (10 + 25×10 = 260). Developers estimating GraphQL rate-limit budgets can follow platform cost changes like this on daily.dev."}},{"@type":"Question","name":"How should I batch Shopify metafieldsSet calls to avoid hitting rate limits under the new dynamic cost model?","acceptedAnswer":{"@type":"Answer","text":"Group metafields by owner rather than splitting requests, since additional metafields on the same resource are free but every call still pays the flat 10-point base cost. Splitting one request across 25 orders into 25 separate requests costs far more overall than sending them together, so batch writes per distinct resource and check the extensions.cost field to verify the actual charge. Developers optimizing GraphQL request batching strategies can find changes like this through daily.dev."}}]}
```

