Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Decoupled Router

Security covered Under active development 10,426 sites

Part of the Decoupled ecosystem · 20 projects

Decoupled Router provides an endpoint for decoupled applications to resolve front-end paths to specific content entities. It follows any redirects and URL aliases to find the underlying content, allowing front-end applications to display content without needing to know Drupal's internal routing. This integration helps editors maintain full control over content paths in consumer applications like React.

Decoupled Router provides an endpoint that will help you resolve path aliases and redirects for entity related routes. This is specially useful for decoupled applications where the editor wants full control over the paths available in the consumer application (for instance a React app).

To get a better understanding of this module read Decoupled Drupal Hard Problems: Routing.

Read the article

Decoupled Router is an endpoint that receives a front-end path and tries to resolve it to an entity. To do so it follows as many redirects and URL aliases as necessary. In the example of /recipes/four-hour-stewed-lamb it would follow the redirect down to /recipes/4-hour-lamb-stew and resolve that URL alias to node:1. The endpoint provides some interesting information about the route and the underlying entity.

In a previous post, we discussed how multiple requests degrade performance significantly. With that in mind, making an extra request to resolve the redirects and aliases seems less attractive. We can solve this problem using the Subrequests module. Like we discussed in detail, we can use response tokens to combine several requests in one.

Imagine that we want to resolve /bread and display the title and image. However, we don’t know if /bread will resolve into an article or a recipe. We could use Subrequests to resolve the path and the JSON API entity in a single request.

In the request above, we provide the path we want to resolve. Then we get the following response.

Contenta CMS

This module is part of the Contenta CMS decoupled distribution and integrates with Contenta JS. Learn more about these projects:

πŸ‘‰ Contenta CMS πŸ‘ˆ
πŸ”₯ Contenta JS πŸ”₯
Drupal 10–11

Ask your assistant about Decoupled Router

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • path_alias Drupal core

Required by

2 tracked projects depend on this one

Activity

Tracked releases
3
Tracked since
Jul 2024
Latest release
1 month ago
Releases (12 mo)
1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.7 Stable 10–11 Aug 22, 2026
2.0.6 Stable 10–11 Sep 8, 2025
2.0.5 Stable 9–11 PHP >=8.1 Jul 10, 2024