Skip to main content
object

Contains all fields required to generate sitemaps.

•Count

The number of sitemap's pages for a given type.

Show fields
•PaginatedSitemapResources

A list of sitemap's resources for a given type.

Important Notes:

  • The number of items per page varies from 0 to 250.
  • Empty pages (0 items) may occur and do not necessarily indicate the end of results.
  • Always check hasNextPage to determine if more pages are available.

Requests for sitemap resources might be throttled. When a request is throttled, resources returns null with an error whose extensions.code is THROTTLED, and the HTTP status is still 200. To detect throttling, check extensions.code rather than the error message. Treat a throttled page as failed rather than empty, and retry later.

Show fields

Arguments

•Int!
required

The page number to fetch.



Was this section helpful?

•query

Returns sitemap data for a specific resource type, enabling headless storefronts to generate XML sitemaps for search engine optimization. The query provides a page count and paginated access to resources like Product, Collection, Page, and Blog objects.

When paginating through resources, the number of items per page varies from 0 to 250, and empty pages can occur without indicating the end of results. Always check hasNextPage to determine if more pages are available. Requests for sitemap resources might be throttled; see resources for how throttled requests are reported.

Show fields

Arguments

•SitemapType!
required

The type of the resource for the sitemap.

Show enum values


Was this section helpful?