From bigcommerce-commerce
Queries and mutates BigCommerce GraphQL Storefront API for products, carts, customers; manages auth tokens and customer impersonation for client-side storefront apps.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin bigcommerce-commerceThis skill is limited to using the following tools:
**Fetch live docs**:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Fetch live docs:
https://developer.bigcommerce.com/docs/storefront/graphql for GraphQL overviewsite:developer.bigcommerce.com graphql storefront api reference for schema referencebigcommerce graphql storefront token for token creationA client-side GraphQL API designed for storefront applications:
https://{store_domain}/graphql| Feature | GraphQL Storefront | REST API |
|---|---|---|
| Audience | Frontend/browser | Backend/server |
| Auth | Storefront token | API account token |
| Data shape | Client-defined | Server-defined |
| Rate limits | Complexity-based | Request count |
| Mutations | Cart, checkout, login | Full CRUD |
Create via REST API:
POST /v3/storefront/api-token
{
"channel_id": 1,
"expires_at": 1893456000,
"allowed_cors_origins": ["https://my-storefront.com"]
}
Returns a token to use as Authorization: Bearer {token} header.
For accessing customer-specific data (addresses, orders, wishlists):
POST /v3/storefront/api-token-customer-impersonation
{
"channel_id": 1,
"expires_at": 1893456000
}
Combine with X-Bc-Customer-Id header for customer-specific queries.
In Stencil themes, the GraphQL token is available automatically:
{{inject 'graphQLToken' settings.storefront_api.token}} in templates/api/storefront/graphql-token endpointquery Products($first: Int, $after: String) {
site {
products(first: $first, after: $after) {
edges {
node {
entityId
name
path
prices {
price { value currencyCode }
salePrice { value currencyCode }
}
defaultImage {
url(width: 500)
altText
}
}
}
pageInfo { hasNextPage endCursor }
}
}
}
query Product($productId: Int!) {
site {
product(entityId: $productId) {
entityId
name
description
prices { price { value currencyCode } }
images { edges { node { url(width: 800) altText } } }
productOptions { edges { node { entityId displayName } } }
variants { edges { node { entityId sku } } }
}
}
}
query Categories {
site {
categoryTree {
entityId
name
path
children { entityId name path }
}
}
}
query Cart {
site {
cart {
entityId
lineItems {
physicalItems {
entityId
name
quantity
listPrice { value currencyCode }
}
}
amount { value currencyCode }
}
}
}
query Customer {
customer {
entityId
firstName
lastName
email
addresses { edges { node { address1 city } } }
}
}
mutation AddToCart($cartId: String!, $lineItems: [CartLineItemInput!]!) {
cart {
addCartLineItems(input: {
cartEntityId: $cartId
data: { lineItems: $lineItems }
}) {
cart { entityId }
}
}
}
mutation CreateCart($lineItems: [CartLineItemInput!]!) {
cart {
createCart(input: { lineItems: $lineItems }) {
cart { entityId }
}
}
}
mutation Login($email: String!, $password: String!) {
login(email: $email, password: $password) {
result
customer { entityId firstName }
}
}
Uses Relay-style cursor pagination:
first: N — number of itemsafter: "cursor" — cursor from pageInfo.endCursorpageInfo { hasNextPage endCursor } — pagination metadataGraphQL queries have complexity limits instead of request-count rate limits:
first arguments to limit resultsSELECT * mentalityfirst + after) for large collectionserrors array of the GraphQL responseFetch the BigCommerce GraphQL Storefront API reference for the current schema, available queries/mutations, and authentication patterns before implementing.