Shopify-Complexity-Score

The HTTP Shopify-Complexity-Score response header is an unofficial Shopify-specific header reporting the computed complexity score for the current request.

Usage

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

Takeaway

The Shopify-Complexity-Score header surfaces Shopify's internal measure of request cost. Tracking the value across different queries helps developers identify optimization opportunities and stay within Shopify's complexity limits.

See also

Last updated: March 6, 2026