← all adapters

shopify-style

simulates Shopify Admin REST + GraphQL API 2024-10

restadapter v0.2.021 routes

verification

SDKverified with go-shopify/v4 v4.7.0· surface 21 · not implemented 7 · differs 4

use it

# add to stunt.yaml
services:
  shopify:
    adapter: embedded:shopify-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the Shopify Admin REST + GraphQL API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Shopify Admin REST + GraphQL API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Shopify Admin REST + GraphQL API 2024-10 surface — the data is fake, the behavior is real.

backing stores

productsorderscustomersfulfillmentstransactionswebhooksoauth_codes

api surface (21)

generated from the adapter manifest — exactly what boots, nothing more

21 routes · graphql
GET/admin/oauth/authorize
POST/admin/oauth/access_token
GET/admin/api/2024-10/products.json
POST/admin/api/2024-10/products.json
GET/admin/api/2024-10/products/{product_id}
PUT/admin/api/2024-10/products/{product_id}
DELETE/admin/api/2024-10/products/{product_id}
GET/admin/api/2024-10/orders.json
POST/admin/api/2024-10/orders.json
GET/admin/api/2024-10/orders/{order_id}
POST/admin/api/2024-10/orders/{order_id}/cancel.json
POST/admin/api/2024-10/orders/{order_id}/close.json
POST/admin/api/2024-10/orders/{order_id}/fulfillments.json
POST/admin/api/2024-10/orders/{order_id}/transactions.json
GET/admin/api/2024-10/customers.json
POST/admin/api/2024-10/customers.json
PUT/admin/api/2024-10/customers/{customer_id}
DELETE/admin/api/2024-10/customers/{customer_id}
GET/admin/api/2024-10/webhooks.json
POST/admin/api/2024-10/webhooks.json
DELETE/admin/api/2024-10/webhooks/{webhook_id}

SDK-verified behaviors (5)

  • Webhook.Create (orders/create)
  • Order.Create x4 (numeric ids)
  • Order.Create with embedded customer (numeric id round-trip)
  • Order.ListWithPagination walks page_info cursors
  • webhooks verify through the SDK's VerifyWebhookRequest HMAC validator

Not implemented (7)

  • No fulfillment-orders or fulfillment-events endpoints (fulfillments POST only)
  • No transaction listing (GET /orders/{id}/transactions.json)
  • No refunds endpoint (POST /orders/{id}/refunds.json)
  • No Inventory API (inventory_items, inventory_levels)
  • No product image or standalone variant CRUD routes
  • GraphQL schema limited to shop, product, order, customer types
  • No price rules, discount codes, gift cards, or draft orders

Differs from the real API (4)

  • GraphQL endpoint skips the X-Shopify-Access-Token check the REST surface enforces
  • Webhook payloads ride stunt {type, payload} envelope, not raw Shopify event bodies
  • OAuth authorize redirect omits the hmac query-param signature it documents
  • GraphQL query arg subset: bare substring plus field:value equality tokens only
want more of the Shopify Admin REST + GraphQL API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.

case study