MageSmith
QueryUrlRewrite · Magento 2.4.9

route

route is a Magento 2 GraphQL query in the UrlRewrite module. Return the full details for a specified product, category, or CMS page. It returns RoutableInterface and is callable anonymously.

Last verified: against Magento 2.4.9.

Returns

RoutableInterface

Resolver class

Magento\UrlRewriteGraphQl\Model\Resolver\Route

Cache

identity: Magento\UrlRewriteGraphQl\Model\Resolver\UrlRewrite\UrlResolverIdentity

Arguments

url String! Required

A `url_key` appended by the `url_suffix, if one exists.

Example request

Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.

Headers

Content-Type
application/json
Store
default store view code; use 'default' for the single-store baseline

Query

query ($url: String!) {
  route(url: $url) {
    relative_url
    redirect_code
    type
  }
}

Variables

{
  "url": ""
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.