Skip to content
On this page

Breadcrumb

Adds types and fields to get the breadcrumb for a route.

Schema

Base

graphql
type Breadcrumb {
  url: Url!
  title: String!
}

Extension

graphql
extend interface InternalUrl {
  breadcrumb: [Breadcrumb!]!
}

extend interface EntityUrl {
  breadcrumb: [Breadcrumb!]!
}

extend type DefaultInternalUrl {
  breadcrumb: [Breadcrumb!]!
}

extend type DefaultEntityUrl {
  breadcrumb: [Breadcrumb!]!
}

extend type EntityCanonicalUrl {
  breadcrumb: [Breadcrumb!]!
}

Example

graphql
query {
  route(path: "/de/admin/config/system/site-information") {
    ... on InternalUrl {
      breadcrumb {
        url {
          path
        }
        title
      }
    }
  }
}
json
{
  "data": {
    "route": {
      "breadcrumb": [
        {
          "url": {
            "path": "/de"
          },
          "title": "Startseite"
        },
        {
          "url": {
            "path": "/de/admin"
          },
          "title": "Verwaltung"
        },
        {
          "url": {
            "path": "/de/admin/config"
          },
          "title": "Konfiguration"
        },
        {
          "url": {
            "path": "/de/admin/config/system"
          },
          "title": "System"
        }
      ]
    }
  }
}