Saltar al contenido
Guías

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 ser null.
  • Los IDs públicos usan String, aunque su valor parezca numérico. Son opacos.
  • Decimal representa importes y mediciones decimales.
  • DateTime usa una fecha y hora ISO 8601.
  • Un argumento sin ! puede omitirse o enviarse como null.
  • GraphQL solo devuelve los campos incluidos en el selection set.

Query

CampoFirmaRetornoReferencia
storestoreStorefrontStore!Abrir
productsproducts(input: StorefrontProductsInput)SearchResult!Abrir
productproduct(slug: String!)ProductDetail!Abrir
relatedProductsrelatedProducts(productId: String!, limit: Int)[ProductSummary!]!Abrir
collectionscollections(search: String, sort: NavigationSearchSort)[CollectionItem!]!Abrir
collectioncollection(slug: String!)CollectionItem!Abrir
sellerssellers[StorefrontSellerDto!]!Abrir
sellerseller(slug: String!)StorefrontSellerProfileDto!Abrir
productReviewsproductReviews(productId: String!, ...)Resultado paginado de reseñasAbrir

Esta tabla es exhaustiva para la raíz pública actual. Las operaciones que no aparecen aquí continúan en REST.

StorefrontProductsInput

CampoTipoLímite o valor predeterminado
productIds[String!]Máximo 100 IDs válidos.
searchStringMá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.
collectionIdStringID 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.
inStockBooleanSin filtro si se omite.
minPriceDecimalMayor o igual a 0.
maxPriceDecimalMayor o igual a 0 y a minPrice.
pageInt1; de 1 a 100.
pageSizeInt24; de 1 a 100.
sortProductSearchSortDEFAULT.

Los filtros de faceta usan option:nombre:valor o attribute:nombre:valor. Consulta products para las reglas de combinación.

Enums

EnumValores
StoreTypeB2C, MARKETPLACE, RETAIL, B2B, SOCIAL, HUB, RESTAURANT
ProductTypePRODUCT, SERVICE, BUNDLE
ProductSearchSortDEFAULT, PRICE_ASC, PRICE_DESC, NEWEST, NAME_ASC, NAME_DESC
NavigationSearchSortDEFAULT, NAME_ASC, NAME_DESC, ORDER_ASC, ORDER_DESC, NEWEST, UPDATED_DESC
SortDirectionASC, 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

TipoCampos
StorefrontStoreid, name, description, slug, domain, logo, icon, type, currency, language
CollectionItemid, slug, name, description, imageUrl, type, productCount
StorefrontSellerDtoid, name, slug, logo, rating
StorefrontSellerProfileDtoid, name, slug, logo, rating, deliveryPolicy, privacyAndSecurityPolicy
StorefrontSellerRatingDtoaverage, totalReviews

Los campos opcionales se documentan con su nullability exacta en la página de cada query.

Objetos de producto

TipoCampos principales
SearchResultpageIndex, pageSize, totalCount, totalPages, products, filters
ProductSummaryid, name, slug, productType, imageUrl, price, compareAtPrice, variantCount, isAvailable, totalInventory, bundleItemsCount, brand, category, status, collections, tags, seller
ProductDetailCampos de ProductSummary aplicables más description, categoryId, specifications, variants, images, bundleItems, sizeGuide, priceTiers, createdAt, updatedAt
ProductSellerInfoid, name, slug
SearchFilterid, label, type, values, min, max, selectedMin, selectedMax
FacetItemvalue, count, label, selected

El detalle usa además estos objetos:

TipoCampos
SpecItemkey, name, value
ImageItemurl, name, order
VariantItemid, sku, status, price, compareAtPrice, quantity, isAvailable, requiresShipping, options, images
BundleItemproductId, variantId, productName, variantName, sku, brand, imageUrl, quantity, available, allowBackorders, requiresShipping
ProductPriceTiervariantId, minQuantity, maxQuantity, unitPrice
SizeGuideInfoid, name, slug, description, imageUrl, gender, measurementType, unit, notes, rows
SizeGuideRowInfolabel, sizeKey, order, measurements
SizeGuideMeasurementInfokey, 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:

CampoTipoUso
data[StorefrontReviewDto!]!Página actual.
hasNextPageBoolean!Indica si puedes continuar.
nextCursorStringCursor opaco para la siguiente página.
totalCountLongTotal disponible cuando se calcula.

StorefrontReviewDto contiene id, productId, isVerifiedPurchase, rating, title, content, reviewerName y createdOn.

Límites rápidos

OperaciónLímite
product.slug, collection.slug200 caracteres
seller.slug100 caracteres
relatedProducts.limit1–12; predeterminado 8
products.page, products.pageSize1–100; predeterminados 1 y 24
collections.search200 caracteres
productReviews.limit1–200; predeterminado 20
productReviews.rating1–5
productReviews.cursor2000 caracteres
productReviews.search200 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.

En esta página