Skip to main content
Anchor to SearchResultItemConnection

SearchResultItemConnection

connection

An auto-generated type for paginating through multiple SearchResultItems.

Anchor to Queries with this connectionQueries with this connection

•query

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. A search returns up to 1,000 results. When product results are included, a search returns up to 2 pages or articles, on the first page of results only. To get more pages and articles, run a separate search with types: [PAGE, ARTICLE]. Product results match partial words automatically. For page and article results, use the prefix argument to match partial words on the last search term, so that a query like "winter snow" can match pages that contain "snowboard" or "snowshoe".

Show fields

Arguments

•String

Returns the elements that come after the specified cursor.

•String

Returns the elements that come before the specified cursor.

•Int

Returns up to the first n elements from the list.

•Int

Returns up to the last n elements from the list.

•SearchPrefixQueryType

For page and article results, specifies whether to match partial words on the last search term. Product results match partial words automatically.

Show enum values
•[ProductFilter!]

Returns a subset of products matching all product filters.

The input must not contain more than 250 values.

Show input fields
•String!
required

The search query.

•Boolean
Default:false

Reverse the order of the underlying list.

•SearchSortKeys
Default:RELEVANCE

Sort the underlying list by the given key.

Show enum values
•[SearchType!]

The types of resources to search for.

The input must not contain more than 250 values.

Show enum values
•SearchUnavailableProductsType

Specifies how unavailable products or variants are displayed in the search results.

Show enum values


Was this section helpful?

•[SearchResultItemEdge!]!
non-null

A list of edges.

Show fields
•[SearchResultItem!]!
non-null

A list of the nodes contained in SearchResultItemEdge.

Show union types
•PageInfo!
non-null

Information to aid in pagination.

Show fields
•[Filter!]!
non-null

A list of available filters.

Show fields
•Int!
non-null

The total number of results, up to a maximum of 1,000. If a search matches more than 1,000 results, then it returns 1,000, and pagination returns up to the first 1,000 results.


Was this section helpful?