Apply Patches

Apply patches for Subrequests and Decoupled Router modules


In a future release, these patches will NOT be required for using Next.js and GraphQL.

At the time of this writing, there are two patches we need to wire everything together.

  1. Open your Drupal composer.json file.
  2. Add the following patches under "extra".

composer.json

"extra": {
"patches": {
"drupal/subrequests": {
"#3049395-47 - Page Cache causes different subrequests to return the same responses": "https://www.drupal.org/files/issues/2022-12-06/subrequests-3049395-chnage-request-type-47.patch"
},
"drupal/decoupled_router": {
"#3111456-59 - Unable to resolve path on node in other language than default": "https://www.drupal.org/files/issues/2022-12-01/decouple_router-3111456-resolve-language-issue-58--get-translation.patch"
}
},
}

Note: If you're not using multilingual features such as translation, you can skip the second patch.

  1. Run the following command:
composer require cweagans/composer-patches

You can read more about the patches here:

  1. https://www.drupal.org/project/subrequests/issues/3049395
  2. https://www.drupal.org/project/decoupled_router/issues/3111456