shopify-known-pitfalls

Featured

Identify and avoid Shopify API anti-patterns: ignoring userErrors, wrong API version, REST instead of GraphQL, missing GDPR webhooks, and webhook timeout issues. Trigger with phrases like "shopify mistakes", "shopify anti-patterns", "shopify pitfalls", "shopify what not to do", "shopify code review".

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 Known Pitfalls ## Overview The 10 most common mistakes when building Shopify apps, with real API examples showing the wrong way and the right way. ## Prerequisites - Shopify app codebase to review - Understanding of GraphQL Admin API patterns ## Instructions ### Pitfall #1: Not Checking userErrors (The #1 Mistake) Shopify GraphQL mutations return HTTP 200 even when they fail. The errors are in `userErrors`. ```typescript // WRONG — assumes 200 means success const response = await client.request(PRODUCT_CREATE, { variables }); const product = response.data.productCreate.product; // null! console.log(product.title); // TypeError: Cannot read property 'title' of null // RIGHT — always check userErrors const response = await client.request(PRODUCT_CREATE, { variables }); const { product, userErrors } = response.data.productCreate; if (userErrors.length > 0) { console.error("Shopify validation failed:", userErrors); // [{ field: ["title"], message: "Title can't be blank", code: "BLANK" }] throw new ShopifyValidationError(userErrors); } console.log(product.title); // Safe ``` --- ### Pitfall #2: Using REST When GraphQL Is Required REST Admin API is legacy as of October 2024. New public apps after April 2025 **must** use GraphQL. ```typescript // WRONG — REST API (legacy, higher bandwidth, returns all fields) const { body } = await restClient.get({ path: "products", query: { limit: 250 } }); // Returns EVERYTHING: body_html, template_suffix, published_sc...

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