Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Jan 3, 2022
1 parent c6e4298 commit 3794b9c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,9 @@ Then export a new function `onCreateNode`, and call `createRemoteFileNode` in it
exports.onCreateNode = async ({
node, // the node that was just created
actions: { createNode, createNodeField },
store,
cache,
createNodeId,
getCache,
}) => {
if (node.internal.type === POST_NODE_TYPE) {
const fileNode = await createRemoteFileNode({
Expand All @@ -536,7 +537,8 @@ exports.onCreateNode = async ({
parentNodeId: node.id,
createNode,
createNodeId,
getCache,
cache,
store,
})

if (fileNode) {
Expand Down

0 comments on commit 3794b9c

Please sign in to comment.