Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit fetch to teamspace or rootNotionPageId children #571

Open
drewatdrawn opened this issue Nov 28, 2023 · 4 comments
Open

Limit fetch to teamspace or rootNotionPageId children #571

drewatdrawn opened this issue Nov 28, 2023 · 4 comments

Comments

@drewatdrawn
Copy link

Description

I have multiple team spaces used for different clients that I am building out to individual sites. I frequently hit rate limits and can't publish to Vercel because the build process queries all blocks for all teamspaces in my notion account.

It would be great of the rootNotionPageId specified in the config was used as the parent from which the queries happened so as to avoid overfetching.

Is there another way I can limit fetching to only a single teamspace?

@transitive-bullshit
Copy link
Owner

Have you tried rootNotionSpaceId?

@drewatdrawn
Copy link
Author

I have, I had the same overfetching and rate limiting issues.

@drewatdrawn
Copy link
Author

I tried experimenting with different workspace / teamspace configurations in Notion to get more information on the overfetching issue. If I create a new workspace and duplicate my content into that workspace, there are no problems (this makes sense, there are no other teamspaces to overfetch into). This would be fine but Notion's paid plan doesn't span workspaces, so I am limited to 1000 blocks if I add collaborators to the new workspace.

If I create a new teamspace in my current workspace and it contains only the root Notion page I want (and its children), I still have the overfetching issue. I can see from the pages queried in the console log in my terminal that pages outside of the teamspace are being referenced.

This happens whether or not I enable the rootNotionSpaceId in the site.config.ts file. I did notice that the rootNotionSpaceId is the same regardless of which teamspace my rootNotionPageId is in, but does change if I switch workspaces. The rootNotionSpaceId seems tied to the workspace, not the teamspace.

@drewatdrawn
Copy link
Author

@transitive-bullshit any other ideas on how to limit fetching here? Is that how the rootNotionSpaceId is intended to work? Any insight greatly appreciated! This starter kit is fantastic - hoping I can work out the fetching issue. The rate limiting timeout is a bummer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants