Skip to Content

Resource

A resolved URL path resource, containing the type and optional ID.

Type Definition

type Resource { type: ResourceKind! id: String alternates: [Alternate] }

Fields

FieldTypeDescription
typeResourceKind!The type of resource this path resolves to.
idStringThe unique identifier of the resource. Null for system pages like login, cart, etc.
alternates[Alternate]Alternate language URLs for this resource, used for hreflang links and language switching.

Relationships

The Resource type represents a resolved URL path within the storefront. The type field indicates what kind of resource the path resolves to using the ResourceKind enum. For resources with identifiable entities (such as products or collections), the id field contains the unique identifier. System pages like login and cart pages have no associated ID. The alternates field provides multilingual URL variants useful for SEO and language switching functionality.

Example

{ resourceByPath(path: "/products/awesome-jacket") { type id alternates { language path } } }

Implements

None