- Called the
/api/graphqlendpoint with a GraphQL client. - Fetched a list of templates from your account.
- Seen how errors are shaped.
- Know where to go next for full schema exploration.
Before you start
You need:- A Customei-enabled Shopify store you can sign into as Owner or Staff.
- A session token (or standalone-mode env vars for local dev). See Authentication if you haven’t done this yet.
curlor a GraphQL client (we’ll usegraphql-requestin the Node example, but any client works).
Your first query
Let’s fetch the current shop’s basic info — a safe, read-only query that works for every authenticated caller.curl
Node.js with graphql-request
Fetch-only (no client library)
A slightly more interesting query
Let’s fetch the first ten design templates in the account:- Pagination uses a
limit+offsetpair in most list queries. Results come back in a{ items, totalCount }wrapper so you can drive pagers from a single query. - Filtering is done with a
whereargument (when supported). For example,designTemplates(where: { name: { contains: "Mug" } })— see each query’s schema for the exact filter inputs.
A mutation: create a template
Mutations look just like queries, with themutation keyword:
template:create, Customei responds with a 403 and a permission error. See Errors and rate limits.
Exploring the schema
Customei’s GraphQL Yoga endpoint ships an interactive GraphiQL explorer in development and for authenticated admin sessions in production. Visithttps://your-app.example.com/api/graphql in a browser while signed into the embedded admin and you’ll get:
- A schema browser on the right — click any type to see its fields.
- A query editor with autocompletion.
- A response pane that runs against your real account.
getSchema() helper that does this for you.
Query conventions you’ll see throughout the API
A few patterns are worth memorizing — they recur across almost every resource:{ items, totalCount }lists. Every list field follows this shape. Drive pagers fromtotalCountpluslimit+offset.wherefilters. Most lists accept awhereargument withequals,in,contains,gte,lteoperators per field. Combine withAND/OR.- Auto-include for relations. Customei’s Prisma middleware auto-includes related objects based on what you ask for in the query — no manual
includeLayers: trueflag needed. Just select the nested fields you want and they come back. - ID prefixes. Each resource type has a distinctive ID prefix:
tpl_for templates,os_for option sets,lib_for libraries,ord_for orders. Useful for debugging where an ID came from. - Timestamps. All dates are ISO-8601 UTC strings.
Next
- App proxy endpoints — the storefront-facing subset of the API.
- Errors and rate limits
- Webhooks — for push-based integrations.