-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The implementation of the findMany method uses mismatched properties from the options argument.
Documentation URL
https://interactive-inc.github.io/open-notion/guides/query.html#find-many
// Get all records
const { records } = await contactsTable.findMany()
// With filtering
const { records } = await contactsTable.findMany({
where: { active: true }
})
// With pagination
const { records, hasMore, nextCursor } = await contactsTable.findMany({
limit: 10
})
// Next page
const nextPage = await contactsTable.findMany({
limit: 10,
cursor: nextCursor
})Library method declaration
https://github.com/interactive-inc/open-notion/blob/a147f05a54499933a83010d41cf3ffd39a1e879d/lib/table/notion-table.ts#L57-L81
The documentation and intended usage show that the options object should contain the limit and cursor properties for pagination. However, these properties are not utilized within the function body, which prevents pagination from working as wanted. The function body incorrectly attempts to use a count property from the options object instead.
BTW i just reporting this library problem, and i have no solution to merge for now.
Thank you for making this library. I still happy to use it. @shigurenimo @sakaritoru Arigato