gatsby-source-notion-churnotion 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,7 +66,7 @@ const createSchemaCustomization = ({ actions }) => {
66
66
  }
67
67
 
68
68
  type ${constants_1.NODE_TYPE.RelatedPost} implements Node {
69
- posts: [${constants_1.NODE_TYPE.RelatedPost}]
69
+ posts: [${constants_1.NODE_TYPE.Post}] @link(by: "id")
70
70
  }
71
71
  `);
72
72
  };
@@ -107,9 +107,7 @@ const onPostBootstrap = async ({ actions, getNode, getNodesByType, createNodeId,
107
107
  .map((x) => (x === undefined ? 0 : x)));
108
108
  });
109
109
  nodes.forEach((node) => {
110
- const related_nodes = getRelatedPosts(node.id, bow_vectors)
111
- .slice(1)
112
- .map((id) => getNode(id));
110
+ const relatedNodeIds = getRelatedPosts(node.id, bow_vectors);
113
111
  const digest = `${node.id} - ${constants_1.NODE_TYPE.RelatedPost}`;
114
112
  actions.createNode({
115
113
  id: createNodeId(digest),
@@ -118,7 +116,7 @@ const onPostBootstrap = async ({ actions, getNode, getNodesByType, createNodeId,
118
116
  type: constants_1.NODE_TYPE.RelatedPost,
119
117
  contentDigest: digest,
120
118
  },
121
- posts: related_nodes,
119
+ posts: relatedNodeIds,
122
120
  });
123
121
  });
124
122
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gatsby-source-notion-churnotion",
3
3
  "description": "Gatsby plugin that can connect with One Notion Database RECURSIVELY using official API",
4
- "version": "1.1.4",
4
+ "version": "1.1.6",
5
5
  "skipLibCheck": true,
6
6
  "license": "0BSD",
7
7
  "main": "./dist/gatsby-node.js",