# Rate Limiting GraphQL APIs by Calculating Query Complexity

DevFeed: [Rate Limiting GraphQL APIs by Calculating Query Complexity](<https://devfeed.tech/articles/rate-limiting-graphql-apis-by-calculating-query-complexity-1529.md>)

Original publisher: [Read original article](<https://shopify.engineering/rate-limiting-graphql-apis-calculating-query-complexity>)

Author: Guilherme Vieira

Published: 2021-06-22T18:30:02Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Shopify](<https://devfeed.tech/topics/shopify.md>), [API](<https://devfeed.tech/topics/api.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [servers](<https://devfeed.tech/topics/servers.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [loops](<https://devfeed.tech/tags/loops.md>), [performance](<https://devfeed.tech/tags/performance.md>), [points](<https://devfeed.tech/tags/points.md>), [rest](<https://devfeed.tech/tags/rest.md>), [servers](<https://devfeed.tech/tags/servers.md>), [shopify](<https://devfeed.tech/tags/shopify.md>)

## AI overview

The article explains Shopify's rate-limiting system for the GraphQL Admin API. It contrasts request-based REST API limits with a calculated query cost model that assigns costs according to the data requested and the resulting server load.

## Source excerpt

GraphQL opens new possibilities for rate limiting. I'll show you Shopify's rate limiting system for the GraphQL Admin API and how it addresses some limitations of common methods commonly used in REST APIs.