Search GraphQL latest

Current guide for Enad Search GraphQL, app-scoped context, Search operation documents, and SDK Search surfaces.

API
Search GraphQL
Schema
search-graphql

Use Search GraphQL for new storefront discovery.

Search covers product listings and detail reads, facets, category or collection browsing, brand or series browsing, redirects, variants, autocomplete, and operation documents. Use the Shopper API only when an existing client still depends on the deprecated public REST read surface.

When contract details matter, use Search GraphQL reference, raw SDL, generated documents, and package reference for fields, operation variables, fragments, nullability, enum values, and TypeScript types.

Start by job

Raw schema SDL lives at /graphql/search-schema.graphql; operation and fragment documents live at /graphql/search-documents.graphql.

MCP read surface

Enad MCP should expose GraphQL-backed search.* capabilities for catalog reads instead of adding new Shopper REST dependencies. Use search.* for discovery, product lookup, facets, category and collection browsing, redirects, autocomplete, and related read workflows.

Keep shopper.* MCP capabilities only as deprecated compatibility for existing Shopper REST read flows. If a workflow needs to mutate catalog, commerce, media, or identity state, route it through governed MCP mutation workflows and the api.enad.io API contract instead of Search.

Search endpoint and context

Enad Search is app-scoped. The app ID is part of the request URL, not only a GraphQL variable.

Endpoint shape:

https://graphql.enad.io/{appId}/graphql

Most storefront work also needs the same context your application uses:

  • appId
  • marketSlug
  • storeGroupSlug
  • locale

Keep market, store group, and locale together when reproducing a query in GraphiQL or wiring a React runtime. If a product, price, facet, or translation looks wrong, check context before changing query shape.

SDK surfaces

Search GraphQL is the contract. SDKs provide typed helpers around it.

JobUseWhy
New storefront discovery workSearch guidance and reference routesSearch GraphQL is the preferred surface for new storefront reads and discovery.
Server-side Search calls, integrations, scripts, or custom data loaders@enadhq/enad-ts-sdk/searchIt is the lower-level package-supported Search GraphQL surface and exposes createSearchClient() plus Search documents and types.
Shopper-facing listing or autocomplete UI@enadhq/enad-react-sdkIt provides provider-backed context, Search UI components, and mapping helpers for product data.
Fields, variables, fragments, nullability, enum values, or generated typesSearch GraphQL reference, raw SDL, generated documents, and package referenceUse these before copying contract details into code.
Quick field or context verification for one appApp-scoped GraphiQLIt tests the same appId, marketSlug, storeGroupSlug, and locale before code changes.

Use the TypeScript SDK for server-side Search work. Use the React SDK to compose shopper-facing experiences. Check reference material before copying fields, variables, fragments, or generated types.

Agent handoffs

Contract facts to keep in mind

Use these facts to choose the right reference. Use Search GraphQL reference, raw SDL, generated documents, and package reference for exact fields, variables, fragments, enum values, nullability, and result types.

  • @enadhq/enad-ts-sdk/search is the lower-level package surface for server-side GraphQL reads. Start with createSearchClient() when package helpers fit.
  • Search documents and generated types are exported from the package surfaces. Use them when an operation does not have a named helper or when custom transport is needed.
  • Product and facet query variables can include top-level warehouseSlug. warehouseSlug is not a ProductFilter field.
  • Top-level variables describe request context and query controls. ProductFilter describes product-filtering criteria.
  • Search attribute values resolve as structured value objects rather than serialized JSON strings inside values.
  • React SDK usage should keep provider context, data loading, and shopper UI composition separate. Use React SDK setup for the provider boundary and Product listing and search for PLP, filters, search results, and autocomplete.

Search GraphQL playground

Use the Search GraphQL playground to enter an app_id, introspect the live app-scoped schema, browse root fields and types, generate a starter operation, edit variables, and send one explicit request.

The playground is schema-introspecting for a specific app context. Use the Search reference, raw schema SDL, operation documents, and package reference before shipping production code.

GraphiQL workflow

Use app-scoped GraphiQL when you need to confirm query shape or field availability for one app:

https://graphql.enad.io/{appId}/graphiql

Recommended flow:

  1. Start with the same marketSlug, storeGroupSlug, and locale used by the app.
  2. Run a small product or facet query first.
  3. Add warehouseSlug only as a top-level variable when the query supports it.
  4. Add filters, sort, pagination, or autocomplete variables incrementally.
  5. Move the stable operation into application code or generated package usage only after the GraphiQL result matches the target storefront behavior.

Reference checklist

Before documenting or implementing Search behavior, confirm:

  • Does this job have a named SearchClient helper?
  • If not, is there a generated document/type export for the operation?
  • Are appId, marketSlug, storeGroupSlug, and locale explicit?
  • Is warehouseSlug top-level rather than inside ProductFilter?
  • Does the generated product, variant, or price fragment already include the needed field?
  • For React Search UI, is provider context separate from component composition?

Search GraphQL latest

# Search GraphQL latest Use Search GraphQL for new storefront discovery. Search covers product listings and detail reads, facets, category or collection browsing, brand or series browsing, redirects, variants, autocomplete, and operation documents. Use the [Shopper API](/apis/shopper/latest) only when an existing client still depends on the deprecated public REST read surface. When contract details matter, use [Search GraphQL reference](/reference/search-graphql/latest), raw SDL, generated documents, and package reference for fields, operation variables, fragments, nullability, enum values, and TypeScript types. ## Start by job - Choose between Search guidance, SDKs, and references from [Search overview](/search). - Query from server code, integrations, scripts, or custom loaders with [TypeScript SDK latest](/ts-sdk/latest). - Build PLP, search-results, filters, or autocomplete UI with [React product listing and search](/react-sdk/latest/guides/product-listing-search). - Check fields, variables, fragments, and enum values in [Search GraphQL reference](/reference/search-graphql/latest). - Route API/Search agent work with [API and Search agent guide](/ai/apis/latest). - Move Search data into shopper-facing React UI with [React SDK agent commerce and Search handoff](/ai/react-sdk/latest/commerce-search-handoff). Raw schema SDL lives at `/graphql/search-schema.graphql`; operation and fragment documents live at `/graphql/search-documents.graphql`. ## MCP read surface Enad MCP should expose GraphQL-backed `search.*` capabilities for catalog reads instead of adding new Shopper REST dependencies. Use `search.*` for discovery, product lookup, facets, category and collection browsing, redirects, autocomplete, and related read workflows. Keep `shopper.*` MCP capabilities only as deprecated compatibility for existing Shopper REST read flows. If a workflow needs to mutate catalog, commerce, media, or identity state, route it through governed MCP mutation workflows and the `api.enad.io` API contract instead of Search. ## Search endpoint and context Enad Search is app-scoped. The app ID is part of the request URL, not only a GraphQL variable. Endpoint shape: ```text https://graphql.enad.io/{appId}/graphql ``` Most storefront work also needs the same context your application uses: - `appId` - `marketSlug` - `storeGroupSlug` - `locale` Keep market, store group, and locale together when reproducing a query in GraphiQL or wiring a React runtime. If a product, price, facet, or translation looks wrong, check context before changing query shape. ## SDK surfaces Search GraphQL is the contract. SDKs provide typed helpers around it. | Job | Use | Why | | --- | --- | --- | | New storefront discovery work | Search guidance and reference routes | Search GraphQL is the preferred surface for new storefront reads and discovery. | | Server-side Search calls, integrations, scripts, or custom data loaders | `@enadhq/enad-ts-sdk/search` | It is the lower-level package-supported Search GraphQL surface and exposes `createSearchClient()` plus Search documents and types. | | Shopper-facing listing or autocomplete UI | `@enadhq/enad-react-sdk` | It provides provider-backed context, Search UI components, and mapping helpers for product data. | | Fields, variables, fragments, nullability, enum values, or generated types | [Search GraphQL reference](/reference/search-graphql/latest), raw SDL, generated documents, and package reference | Use these before copying contract details into code. | | Quick field or context verification for one app | App-scoped GraphiQL | It tests the same `appId`, `marketSlug`, `storeGroupSlug`, and `locale` before code changes. | Use the TypeScript SDK for server-side Search work. Use the React SDK to compose shopper-facing experiences. Check reference material before copying fields, variables, fragments, or generated types. ## Agent handoffs - Contract or route-selection tasks: [API and Search agent guide](/ai/apis/latest). - Search data flowing into React UI, pricing display, or purchase-adjacent flows: [React SDK agent commerce and Search handoff](/ai/react-sdk/latest/commerce-search-handoff). - `/llms.txt`, `/llms-full.txt`, or `/ai/manifest.json` setup: [Agent files](/ai/artifacts). ## Contract facts to keep in mind Use these facts to choose the right reference. Use [Search GraphQL reference](/reference/search-graphql/latest), raw SDL, generated documents, and package reference for exact fields, variables, fragments, enum values, nullability, and result types. - `@enadhq/enad-ts-sdk/search` is the lower-level package surface for server-side GraphQL reads. Start with `createSearchClient()` when package helpers fit. - Search documents and generated types are exported from the package surfaces. Use them when an operation does not have a named helper or when custom transport is needed. - Product and facet query variables can include top-level `warehouseSlug`. `warehouseSlug` is not a `ProductFilter` field. - Top-level variables describe request context and query controls. `ProductFilter` describes product-filtering criteria. - Search attribute values resolve as structured value objects rather than serialized JSON strings inside `values`. - React SDK usage should keep provider context, data loading, and shopper UI composition separate. Use [React SDK setup](/react-sdk/latest/setup) for the provider boundary and [Product listing and search](/react-sdk/latest/guides/product-listing-search) for PLP, filters, search results, and autocomplete. ## Search GraphQL playground Use the Search GraphQL playground to enter an `app_id`, introspect the live app-scoped schema, browse root fields and types, generate a starter operation, edit variables, and send one explicit request. The playground is schema-introspecting for a specific app context. Use the Search reference, raw schema SDL, operation documents, and package reference before shipping production code.