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

Parents are now always direct parents; a parent field has been added to block. #259

Closed
Tracked by #257
KoditkarVedant opened this issue Jul 10, 2022 · 0 comments · Fixed by #297 or #307
Closed
Tracked by #257

Parents are now always direct parents; a parent field has been added to block. #259

KoditkarVedant opened this issue Jul 10, 2022 · 0 comments · Fixed by #297 or #307
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@KoditkarVedant
Copy link
Contributor

KoditkarVedant commented Jul 10, 2022

Previously, when accessing the parent of a database or page, that parent was always either a page, database, or workspace. This is un-faithful to the actual data model of Notion, where the parent may also be another block; for example, you can nest a page under a toggle block.

The parent field for page and database has been changed so that it is now always the direct parent of that page or database, and a new parent type has been added: block_id.

Additionally, a parent field has been added to the block object. Together, these changes allow you to fully traverse Notion’s tree.

To emulate the previous behavior of retrieving the page, database, or space parent, you may traverse up the tree using the retrieve a block endpoint. If the parent ≠ one of those types, retrieve the parent block until it is.

Notion changelog: https://developers.notion.com/changelog/releasing-notion-version-2022-06-28

@KoditkarVedant KoditkarVedant added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed up for grabs labels Jul 10, 2022
@KoditkarVedant KoditkarVedant added this to the 4.0.0 milestone Jul 16, 2022
@KoditkarVedant KoditkarVedant linked a pull request Aug 20, 2022 that will close this issue
12 tasks
@KoditkarVedant KoditkarVedant removed help wanted Extra attention is needed up for grabs labels Aug 20, 2022
@KoditkarVedant KoditkarVedant self-assigned this Aug 20, 2022
@KoditkarVedant KoditkarVedant linked a pull request Aug 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
1 participant