wake-storefront-reference-patterns
Skill4 starsChanged 8 months agoMITView on GitHub
Wake Storefront reference to headless mapping. Use when migrating from Wake Storefront templates, porting Queries/*.graphql, or aligning with production patterns. Triggers on: migrate, reference, Queries, productId vs handle, attributeSelections, addToCartFromSpot.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- wake-checkout-flowSkill
- wake-hotsite-bannersSkill
- wake-product-variantsSkill
- wake-scribanSkill
- wake-storefront-apiSkill
- wake-templateSkill
- web-performance-auditSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
When querying in partner/wholesale context, pass partnerAccessToken to product, search, hotsite.
- Distinctive: line 60
Read reference Queries/*.graphql or SnippetQueries/*.graphql
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wake Storefront Reference Patterns
Forbidden: api.fbits.net (and any *.fbits.net). Canonical source: https://wakecommerce.readme.io/docs/schema
Mapping Wake Storefront reference implementations (Queries/, Snippets) to headless Storefront API patterns. Use when migrating from templates or aligning with production query patterns.
When to Use
- Migrating from Wake Storefront reference to headless
- Porting Queries/.graphql or SnippetQueries/.graphql
- Understanding productId vs handle, attributeSelections vs options
- Aligning headless code with production reference
Key Mappings
productId vs handle
| Wake Native (Queries/) | Shopify-like (src/graphql/) | Notes |
| productId (Long) | id, handle | Wake uses Long IDs; no handle |
| productVariantId (Long) | variant id | Wake uses Long |
| attributeSelections(selected) | options, selectedOptions | Wake has matrix, selections |
Rule: Target native Wake schema first. If reference uses Shopify-like layer, map to native (productId, productVariantId) for Storefront API calls.
attributeSelections
Reference uses attributeSelections(selected: $selections) with AttributeFilterInput. Pass { attributeId, value } per attribute. Resolves selectedVariant. See wake-product-variants skill for detail.
SingleProductData Fragment
Reference Queries often use SingleProductData or similar fragment. Contains: attributeSelections, matrix, selectedVariant, prices, images, customizations, subscriptionGroups. Extract fragment from reference and adapt for headless.
addToCartFromSpot
Wake-specific boolean on product. When true, product supports direct add-to-cart. Use with productVariantId and selections. Not in Shopify schema.
partnerAccessToken
When querying in partner/wholesale context, pass partnerAccessToken to product, search, hotsite. Reference may omit; add for headless when needed.
Reference Structure
| Path | Purpose |
| Queries/*.graphql | Native Wake queries (product, search, hotsite, common, home) |
| SnippetQueries/*.graphql | Checkout, wishlist, shipping, etc. |
| Snippets/ | UI snippets (HTML) |
| src/graphql/ | May use Shopify-like schema; different layer |
See references/storefront-queries-index.md for Queries/*.graphql to use case mapping.
Migration Workflow
- Read reference Queries/.graphql or SnippetQueries/.graphql
- Extract root field, args, fragment
- Map to headless: productId not handle; attributeSelections not options
- Generate equivalent headless query/mutation
- Map reference fields to target framework (React, etc.)
References
- Storefront Queries Index
- Wake Commerce docs: wakecommerce.readme.io
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

