MageSmith
QueryUrlRewrite · Magento 2.4.9 Deprecated

urlResolver

urlResolver is a Magento 2 GraphQL query in the UrlRewrite module. Return the relative URL for a specified product, category or CMS page. It returns EntityUrl and is callable anonymously.

Deprecated: Use the `route` query instead.

Last verified: against Magento 2.4.9.

Returns

EntityUrl

Resolver class

Magento\UrlRewriteGraphQl\Model\Resolver\EntityUrl

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!) {
  urlResolver(url: $url) {
    id
    entity_uid
    canonical_url
    relative_url
    redirectCode
    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.