shopify-performance-tuning

Featured

Optimize Shopify API performance with GraphQL query cost reduction, bulk operations, caching strategies, and Storefront API for high-traffic storefronts. Trigger with phrases like "shopify performance", "optimize shopify", "shopify slow", "shopify caching", "shopify bulk operation", "shopify query cost".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Shopify Performance Tuning ## Overview Optimize Shopify API performance through GraphQL query cost reduction, bulk operations for large data exports, response caching, and Storefront API for high-traffic public-facing queries. ## Prerequisites - Understanding of Shopify's calculated query cost system - Access to the `Shopify-GraphQL-Cost-Debug: 1` header for cost analysis - Redis or in-memory cache available (optional) ## Instructions ### Step 1: Analyze Query Cost ```bash # Debug query cost with special header curl -X POST "https://$STORE/admin/api/2024-10/graphql.json" \ -H "X-Shopify-Access-Token: $TOKEN" \ -H "Content-Type: application/json" \ -H "Shopify-GraphQL-Cost-Debug: 1" \ -d '{"query": "{ products(first: 50) { edges { node { id title variants(first: 20) { edges { node { id price } } } } } } }"}' \ | jq '.extensions.cost' ``` Response shows cost breakdown: ```json { "requestedQueryCost": 152, "actualQueryCost": 42, "throttleStatus": { "maximumAvailable": 1000.0, "currentlyAvailable": 958.0, "restoreRate": 50.0 } } ``` **Key rule:** `requestedQueryCost` is calculated as `first * nested_fields`. Reducing `first:` from 250 to 50 can cut cost by 5x. ### Step 2: Reduce Query Cost ```typescript // BEFORE: High cost — requests too many fields and items // requestedQueryCost: ~5,502 const EXPENSIVE_QUERY = `{ products(first: 250) { edges { node { id title description descriptionHtml vendor productType tags ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category