Skip to content

Commit 0566267

Browse files
committed
moved the fetchRelationPages example to the full example
1 parent 9c1145f commit 0566267

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/full/lib/notion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (useOfficialNotionAPI) {
2121
}
2222

2323
export async function getPage(pageId: string): Promise<ExtendedRecordMap> {
24-
const recordMap = await notion.getPage(pageId)
24+
const recordMap = await notion.getPage(pageId, { fetchRelationPages: true })
2525

2626
if (previewImagesEnabled) {
2727
const previewImageMap = await getPreviewImageMap(recordMap)

examples/minimal/pages/[pageId].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import notion from '../lib/notion'
66

77
export const getStaticProps = async (context: any) => {
88
const pageId = (context.params.pageId as string) || rootNotionPageId
9-
const recordMap = await notion.getPage(pageId, { fetchRelationPages: true })
9+
const recordMap = await notion.getPage(pageId)
1010

1111
return {
1212
props: {

packages/notion-client/src/notion-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class NotionAPI {
5353
chunkNumber = 0,
5454
throwOnCollectionErrors = false,
5555
collectionReducerLimit = 999,
56-
fetchRelationPages = true, // New option
56+
fetchRelationPages = false,
5757
kyOptions
5858
}: {
5959
concurrency?: number
@@ -64,7 +64,7 @@ export class NotionAPI {
6464
chunkNumber?: number
6565
throwOnCollectionErrors?: boolean
6666
collectionReducerLimit?: number
67-
fetchRelationPages?: boolean // New option
67+
fetchRelationPages?: boolean
6868
kyOptions?: KyOptions
6969
} = {}
7070
): Promise<notion.ExtendedRecordMap> {

0 commit comments

Comments
 (0)