search
Returns paginated search results for Product, Page, and Article resources based on a query string. Results are sorted by relevance by default.
The response includes the total result count and available product filters for building faceted search interfaces. Use the prefix argument to enable partial word matching on the last search term, allowing queries like "winter snow" to match "snowboard" or "snowshoe".
SearchResultItemConnection arguments
- after (String)
- before (String)
- first (Int)
- last (Int)
- prefix (SearchPrefixQueryType)
- productFilters ([ProductFilter!])
- query (String!)
- reverse (Boolean)
- sortKey (SearchSortKeys)
- types ([SearchType!])
- unavailableProducts (SearchUnavailableProductsType)
- Anchor to afterafter•String
Returns the elements that come after the specified cursor.
- Anchor to beforebefore•String
Returns the elements that come before the specified cursor.
- Anchor to firstfirst•Int
Returns up to the first
nelements from the list.- Anchor to lastlast•Int
Returns up to the last
nelements from the list.- Anchor to prefixprefix•Search
Prefix Query Type Specifies whether to perform a partial word match on the last search term.
- Anchor to productFiltersproduct•[Product
Filters Filter!] Returns a subset of products matching all product filters.
The input must not contain more than
250values.- Anchor to queryquery•String!required
The search query.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Search
Key Sort Keys Default:RELEVANCE Sort the underlying list by the given key.
- Anchor to typestypes•[Search
Type!] The types of resources to search for.
The input must not contain more than
250values.- •Search
Unavailable Products Type Specifies how unavailable products or variants are displayed in the search results.
Anchor to Possible returnsPossible returns
- edges ([SearchResultItemEdge!]!)
- nodes ([SearchResultItem!]!)
- pageInfo (PageInfo!)
- productFilters ([Filter!]!)
- totalCount (Int!)
- Anchor to edgesedges•[Search
Result Item Edge!]! non-null A list of edges.
- Anchor to nodesnodes•[Search
Result Item!]! non-null A list of the nodes contained in SearchResultItemEdge.
- Anchor to pageInfopage•Page
Info Info! non-null Information to aid in pagination.
- Anchor to productFiltersproduct•[Filter!]!
Filters non-null A list of available filters.
- Anchor to totalCounttotal•Int!
Count non-null The total number of results.