The example below creates a redirect.
mutation CreateWebsiteRedirect($input: CreateWebsiteRedirectMutationInput!) {
createWebsiteRedirect(input: $input) {
id
from
to
code
}
}
{
"input": {
"siteId": "5d76bfaf665fc42e008b4569",
"payload": {
"from": "/old-url",
"to": "/new-url"
}
}
}
{
"data": {
"createWebsiteRedirect": {
"id": "5bd8737fee1fdb00d6e83196",
"from": "/old-url",
"to": "/new-url",
"code": 301
}
}
}