redirect
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
| Argument | Type | Description |
|---|---|---|
path | String! |
Returns
| Field | Type | Description |
|---|---|---|
kind | LinkKindType! | |
path | String! | A page's path in the current locale without a locale prefix, or the URL. |
pageType | PageType | The type of the page a PAGE redirect opens. Null for a URL. |
permanent | Boolean! | True for a moved page (301), false for a temporary redirect (302). |
Example
query Redirect($path: String!) { redirect(path: $path) { kind path pageType permanent }}{ "path": "/example"}{ "data": { "redirect": { "kind": "PAGE", "path": "/example", "pageType": "CONTENT", "permanent": true } }}The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

