Feature flags for a storefront
You almost certainly do not need a flag platform. On Shopify you need a convention, a theme setting, and the discipline to delete a flag once it has done its job.
CATEGORY
Everything we have written on apis & engineering — 8 posts, newest first.
You almost certainly do not need a flag platform. On Shopify you need a convention, a theme setting, and the discipline to delete a flag once it has done its job.
Three properties that only work together. Without idempotency you cannot retry safely; without retries you cannot survive a rate limit; without respecting the limit your retries are the outage.
Half of a metafield definition can never be changed after you create it. That half is a published interface, and treating it like a settings screen is how catalogues end up with three fields that mean the same thing.
Lint, preview and a performance budget, run on every pull request. Three stages, all of them built from tools Shopify already ships.
Metaobjects are a database you design once and query for years. The query surface is narrower than the modelling surface, and that is the thing to design around.
Throttling is rarely a limit problem. It is an architecture problem — several jobs sharing one bucket, polling for data that Shopify would have pushed to you.
A bulk mutation is a machine for making ten thousand changes quickly, which is also what it is when the change is wrong. The safety is in the rehearsal, not the API.
Most Shopify integrations are throttled because they ask for too much per query, then retry harder. Read the cost object and the problem goes away.
NEXT STEP
A senior Shopify engineer reviews your storefront, theme performance and checkout, then sends a prioritised list of fixes.