Shopify-Complexity-Score

The HTTP Shopify-Complexity-Score response header is an unofficial, Shopify-specific header reporting the computed cost of a GraphQL Admin API request.

Usage

Note

Shopify does not publicly document this header. The information below is based on observed behavior in production API responses.

Shopify measures the computational cost of each GraphQL Admin API request using an internal scoring system. The Shopify-Complexity-Score header exposes the score in the response, giving developers visibility into how resource-intensive a given request is relative to Shopify's internal thresholds.

The score applies to GraphQL queries on the Admin API. A simple query fetching a single resource produces a low score. A deeply nested query fetching many product variants, metafields, and related resources produces a high score. Shopify enforces complexity limits to prevent any single request from consuming excessive infrastructure capacity. When requests approach or exceed those limits, Shopify throttles or rejects them. Monitoring this header helps developers identify expensive queries before they trigger rate limits in production.

Values

Integer score

The value is a positive integer representing the computed complexity for the request. Higher numbers indicate more resource-intensive operations.

Common values observed in production range from double digits for lightweight requests to four-digit values for complex GraphQL queries fetching large datasets. Values at or near Shopify's internal limit indicate queries worth optimizing.

Example

A lightweight GraphQL Admin API query produces a low complexity score, indicating minimal resource consumption.

Shopify-Complexity-Score: 12

A GraphQL query fetching product listings with variants and images returns a higher score. This value reflects the breadth of data the query requested.

Shopify-Complexity-Score: 340

A complex query fetching multiple collections with nested products, metafields, and media produces a score near Shopify's operational ceiling.

Shopify-Complexity-Score: 1000

See also

Last updated: April 4, 2026