Skip to content

page

Queryin Content

Fetch any page type by path, for a route that does not know which kind of page it will land on. Select the Page fields, and the rest per page type.

Arguments

ArgumentTypeDescription
versionContentVersionType
pathString!
previewIdString

Returns

Page

FieldTypeDescription
idID!Unique identifier for the page.
nameString!Name of the page.
headingString!Text of the page's one top-level heading, which the page renders itself.
pathString!URL path of the page.
translatedPaths[TranslatedPath!]List of translated paths for different locales.
breadcrumbs[Breadcrumb!]Breadcrumb trail for the page.
metaPageMetaPage metadata for SEO and other purposes.

Example

query Page($version: ContentVersionType, $path: String!, $previewId: String) {
page(version: $version, path: $path, previewId: $previewId) {
id
name
heading
path
translatedPaths {
locale
path
}
breadcrumbs {
name
path
type
}
meta {
title
description
}
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.