Skip to content

Commit 195188c

Browse files
authored
docs(migrating-from-v3-to-v4): correct getNode snippet (#34543)
1 parent d39265f commit 195188c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/release-notes/migrating-from-v3-to-v4.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ exports.sourceNodes = ({ actions, getNodesByType }) => {
110110
In case you only have an ID at hand (e.g. getting it from cache), you can use the `getNode()` API:
111111

112112
```js:title=gatsby-node.js
113-
exports.sourceNodes = async ({ actions, getNodesByType, cache }) => {
114-
const { touchNode, getNode } = actions
113+
exports.sourceNodes = async ({ actions, getNode, getNodesByType, cache }) => {
114+
const { touchNode } = actions
115115
const myNodeId = await cache.get("some-key")
116116

117117
touchNode(getNode(myNodeId)) // highlight-line

0 commit comments

Comments
 (0)