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
v2 SDK does not return page properties #334
Comments
Aha. This is apparently intended behaviour! I have found a note halfway down the "page" documentation:
If anyone else gets stuck with this, it looks like this is the way the API is designed. Github issues are probably the wrong forum for feedback about the design changes, but this is an eyebrow-raising decision if ever I've seen one. Updated issue for the Notion team:
I'm downgrading to the v1 SDK so I don't have to write as much code. I guess if I want to use V2 I have to write a bunch of code to send 1 round-trip per database cell? |
Just to add a data point, moving from API v2022-02-22 to v2022-06-28 makes me go from 2 requests (querying a db with 108 elements to get 12 properties) to 12*108 requests, so about 1300 requests total. Having a method to get all properties of a page would be more reasonable... I would do one request per db object. |
Same here, downgraded to v1 sdk due to the new way of fetching property value in v2. According to changelog :
So, the github-sync-project example is supposed to "show us the way" to retrieve property value : notion-sdk-js/examples/notion-github-sync/index.js Lines 87 to 97 in 6ce697f
This makes me very sad that the good practice seems to be doing as many API calls as necessary to fetch values. This SDK version, for bulk use cases, is broken. |
It's such a shame they've dropped the v1 way of fetching properties. I seriously can't see any benefits with the v2 way. |
This looks like a duplicate of #317 |
OK, I skimmed past #317 when I filed this. Because it says it's "missing metadata from properties" when my problem was missing data from properties. I accept that's a dupe though. I don't think this issue is going to get Notion to reconsider their API strategy, but oh boy, a developer can dream. I'll close this issue. I've filed a simpler issue about the API docs: #336 |
Could we reopen and consider this a feature request? Considering:
https://developers.notion.com/reference/request-limits#rate-limits How are we supposed to be able to fetch a database with all the properties of one column? It seems quite a challenge: e.g. #334 (comment) |
Good news: it's now possible again to retrieve page properties values when querying a page! |
Report bugs here only for the Node JavaScript library.
If you're having problems using Notion's API, or have any other feedback about the API including feature requests for the JavaScript library, please email support at developers@makenotion.com.
Describe the bug
When I query a page using the v2.0.0 SDK and above, the responses do not include property values. Just an ID. There's no indication in the documentation that an extra step is required to fetch the page property values.
I'm trying to paginate through a database, but each row contains no property values. It also happens retrieving a single page. I'll write a minimal example:
To Reproduce
Node version: 16.14.0
Notion JS library version: 1.0.4
spec.js:
Result (SDK v1.0.4):
Result (v2.0.0):
Steps to reproduce the behavior:
Run the above script and compare v1.0.4 to 2.0.0 output.
Expected behavior
The SDK should include Notion properties on simple queries.
If this is intentional behaviour: The documentation should make this very obvious! How do I retrieve a full database in the v2 SDK?
The text was updated successfully, but these errors were encountered: