Schema y tipos
Referencia compacta de Query, inputs, enums, objetos, nullability y límites del schema Storefront.
Última actualización:
El schema público de Storefront está orientado a lecturas. Expone una raíz Query; no expone Mutation ni suscripciones.
Convenciones
!significa que el valor no puede sernull.- Los IDs públicos usan
String, aunque su valor parezca numérico. Son opacos. Decimalrepresenta importes y mediciones decimales.DateTimeusa una fecha y hora ISO 8601.- Un argumento sin
!puede omitirse o enviarse comonull. - GraphQL solo devuelve los campos incluidos en el selection set.
Query
| Campo | Firma | Retorno | Referencia |
|---|---|---|---|
store | store | StorefrontStore! | Abrir |
products | products(input: StorefrontProductsInput) | SearchResult! | Abrir |
product | product(slug: String!) | ProductDetail! | Abrir |
relatedProducts | relatedProducts(productId: String!, limit: Int) | [ProductSummary!]! | Abrir |
collections | collections(search: String, sort: NavigationSearchSort) | [CollectionItem!]! | Abrir |
collection | collection(slug: String!) | CollectionItem! | Abrir |
sellers | sellers | [StorefrontSellerDto!]! | Abrir |
seller | seller(slug: String!) | StorefrontSellerProfileDto! | Abrir |
productReviews | productReviews(productId: String!, ...) | Resultado paginado de reseñas | Abrir |
Esta tabla es exhaustiva para la raíz pública actual. Las operaciones que no aparecen aquí continúan en REST.
StorefrontProductsInput
| Campo | Tipo | Límite o valor predeterminado |
|---|---|---|
productIds | [String!] | Máximo 100 IDs válidos. |
search | String | Máximo 200 caracteres. |
categories | [String!] | Máximo 50; 100 caracteres por valor. |
brands | [String!] | Máximo 50; 100 caracteres por valor. |
sellerSlugs | [String!] | Máximo 20; 100 caracteres por slug. |
collections | [String!] | Máximo 50; 100 caracteres por valor. |
collectionId | String | ID público válido. |
productTypes | [ProductType!] | Máximo 50. |
tags | [String!] | Máximo 50; 100 caracteres por valor. |
filters | [String!] | Máximo 100; 250 caracteres por filtro. |
inStock | Boolean | Sin filtro si se omite. |
minPrice | Decimal | Mayor o igual a 0. |
maxPrice | Decimal | Mayor o igual a 0 y a minPrice. |
page | Int | 1; de 1 a 100. |
pageSize | Int | 24; de 1 a 100. |
sort | ProductSearchSort | DEFAULT. |
Los filtros de faceta usan option:nombre:valor o attribute:nombre:valor. Consulta products para las reglas de combinación.
Enums
| Enum | Valores |
|---|---|
StoreType | B2C, MARKETPLACE, RETAIL, B2B, SOCIAL, HUB, RESTAURANT |
ProductType | PRODUCT, SERVICE, BUNDLE |
ProductSearchSort | DEFAULT, PRICE_ASC, PRICE_DESC, NEWEST, NAME_ASC, NAME_DESC |
NavigationSearchSort | DEFAULT, NAME_ASC, NAME_DESC, ORDER_ASC, ORDER_DESC, NEWEST, UPDATED_DESC |
SortDirection | ASC, DESC |
ORDER_ASC y ORDER_DESC usan hoy nombre ascendente para colecciones. En productReviews, SortDirection solo afecta el orden por rating; createdOn siempre usa DESC.
Objetos de tienda y navegación
| Tipo | Campos |
|---|---|
StorefrontStore | id, name, description, slug, domain, logo, icon, type, currency, language |
CollectionItem | id, slug, name, description, imageUrl, type, productCount |
StorefrontSellerDto | id, name, slug, logo, rating |
StorefrontSellerProfileDto | id, name, slug, logo, rating, deliveryPolicy, privacyAndSecurityPolicy |
StorefrontSellerRatingDto | average, totalReviews |
Los campos opcionales se documentan con su nullability exacta en la página de cada query.
Objetos de producto
| Tipo | Campos principales |
|---|---|
SearchResult | pageIndex, pageSize, totalCount, totalPages, products, filters |
ProductSummary | id, name, slug, productType, imageUrl, price, compareAtPrice, variantCount, isAvailable, totalInventory, bundleItemsCount, brand, category, status, collections, tags, seller |
ProductDetail | Campos de ProductSummary aplicables más description, categoryId, specifications, variants, images, bundleItems, sizeGuide, priceTiers, createdAt, updatedAt |
ProductSellerInfo | id, name, slug |
SearchFilter | id, label, type, values, min, max, selectedMin, selectedMax |
FacetItem | value, count, label, selected |
El detalle usa además estos objetos:
| Tipo | Campos |
|---|---|
SpecItem | key, name, value |
ImageItem | url, name, order |
VariantItem | id, sku, status, price, compareAtPrice, quantity, isAvailable, requiresShipping, options, images |
BundleItem | productId, variantId, productName, variantName, sku, brand, imageUrl, quantity, available, allowBackorders, requiresShipping |
ProductPriceTier | variantId, minQuantity, maxQuantity, unitPrice |
SizeGuideInfo | id, name, slug, description, imageUrl, gender, measurementType, unit, notes, rows |
SizeGuideRowInfo | label, sizeKey, order, measurements |
SizeGuideMeasurementInfo | key, name, min, max, value, description |
La referencia de product incluye los tipos y nullability campo por campo.
Reseñas y paginación
El resultado de productReviews expone:
| Campo | Tipo | Uso |
|---|---|---|
data | [StorefrontReviewDto!]! | Página actual. |
hasNextPage | Boolean! | Indica si puedes continuar. |
nextCursor | String | Cursor opaco para la siguiente página. |
totalCount | Long | Total disponible cuando se calcula. |
StorefrontReviewDto contiene id, productId, isVerifiedPurchase, rating, title, content, reviewerName y createdOn.
Límites rápidos
| Operación | Límite |
|---|---|
product.slug, collection.slug | 200 caracteres |
seller.slug | 100 caracteres |
relatedProducts.limit | 1–12; predeterminado 8 |
products.page, products.pageSize | 1–100; predeterminados 1 y 24 |
collections.search | 200 caracteres |
productReviews.limit | 1–200; predeterminado 20 |
productReviews.rating | 1–5 |
productReviews.cursor | 2000 caracteres |
productReviews.search | 200 caracteres |
El schema no sustituye las reglas de negocio
Un valor puede tener el tipo correcto y aun ser rechazado por longitud, rango, visibilidad o contexto de tienda. Cada página de query documenta esas reglas y sus códigos de error.