Skip to content

redirect

Queryin Content

Where a path no page holds now sends a visitor, in the request's market: a redirect for its country before one for every market. Null where the path has no redirect. Ask for it when page answers null, before rendering the not-found page; a redirect never shadows a live page.

Arguments

ArgumentTypeDescription
pathString!

Returns

PageRedirect

FieldTypeDescription
kindLinkKindType!
pathString!A page's path in the current locale without a locale prefix, or the URL.
pageTypePageTypeThe type of the page a PAGE redirect opens. Null for a URL.
permanentBoolean!True for a moved page (301), false for a temporary redirect (302).

Example

query Redirect($path: String!) {
redirect(path: $path) {
kind
path
pageType
permanent
}
}

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