Skip to content

Commit

Permalink
fix: update apply patches documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
backlineint committed Nov 5, 2024
1 parent cfcd026 commit e3d39cb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
22 changes: 6 additions & 16 deletions www/content/tutorials/graphql/apply-patches.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,35 @@ weight: 30
group: Quick Start (GraphQL)
---

At the time of this writing, a patch is required in order to use multilingual features such as translation.

<Callout>

In a future release, these patches will NOT be required for using Next.js and GraphQL.
**Note:** If you're not using multilingual features such as translation, you can skip this step.

</Callout>

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"`.
2. Add the following patch under `"extra"`.

```json title=composer.json
"extra": {
// highlight-start
"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"
"Unable to resolve path on node in other language than default": "https://www.drupal.org/files/issues/2024-10-22/decoupled_router-3111456-resolve-langcode-issue-78--external-redirects.patch"
}
},
// highlight-end
}
```

<Callout>

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

</Callout>

3. Run the following command:

```sh
composer require cweagans/composer-patches
```

You can read more about the patches here:
You can read more about the patch here:

1. https://www.drupal.org/project/subrequests/issues/3049395
2. https://www.drupal.org/project/decoupled_router/issues/3111456
24 changes: 10 additions & 14 deletions www/content/tutorials/quick-start/apply-patches.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,37 @@ weight: 30
group: Quick Start
---

At the time of this writing, there are two patches we need to wire everything together.
At the time of this writing, a patch is required in order to use multilingual features such as translation.

<Callout>

**Note:** If you're not using multilingual features such as translation, you can skip this step.

</Callout>

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

TODO - validate that these patches are necessary and correct.

```json title=composer.json
"extra": {
// highlight-start
"patches": {
"drupal/subrequests": {
"Get same results on different request": "https://www.drupal.org/files/issues/2019-07-18/change_request_type-63049395-09.patch"
},
"drupal/decoupled_router": {
"Unable to resolve path on node in other language than default": "https://www.drupal.org/files/issues/2022-11-30/decouple_router-3111456-resolve-language-issue-58.patch"
"Unable to resolve path on node in other language than default": "https://www.drupal.org/files/issues/2024-10-22/decoupled_router-3111456-resolve-langcode-issue-78--external-redirects.patch"
}
},
// highlight-end
}
```

<Callout>

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

</Callout>

3. Run the following command:

```sh
composer require cweagans/composer-patches
```

You can read more about the patches here:
You can read more about the patch here:

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

0 comments on commit e3d39cb

Please sign in to comment.