shopify-graphql-cost-optimizer

Installation
SKILL.md

Shopify GraphQL Cost Optimizer

Overview

Every Shopify GraphQL query has a calculated cost. The API uses a token bucket (1,000 points max, refills at 50/second for standard plans) and throttles once depleted. The key insight: requestedQueryCost is the worst-case estimate, while actualQueryCost is what you really paid. Understanding the gap between them is how you avoid throttling.

Prerequisites

  • Shopify app with GraphQL Admin API access
  • @shopify/shopify-api package installed
  • Understanding of GraphQL connections (edges/node pattern)

Instructions

Step 1: Read Cost Headers

Every GraphQL response includes cost data in extensions.cost:

Installs
1
GitHub Stars
2.8K
First Seen
13 days ago
shopify-graphql-cost-optimizer — jeremylongshore/tons-of-skills-marketplace