Shopify surface
Identify whether shopify functions and api boundaries belongs to the Admin GraphQL API, Storefront API, a webhook subscription, a Function, Flow, or an app-owned service. Each surface has different trust, execution, and version contracts. Choose a supported target, minimize the input query, return valid output, and keep external state outside execution.
Access and version
Document installation context, token type, header, scopes, protected data needs, and API version for deterministic commerce logic, configuration, deployment, and limits. Authentication identifies the caller; authorization still has to be enforced for the requested action.
Cost and async state
Account for calculated GraphQL query cost, pagination, bulk-operation state, webhook delivery, or queue capacity as applicable. Functions cannot act as general servers or depend on unbounded network and runtime behavior.
Commerce reconciliation
Verify products, variants, orders, inventory, customers, or fulfillments reached the intended Shopify and external states. HTTP 200 can still contain GraphQL errors, and successful receipt is not final business proof.