react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

Can CollectionQueryResult add 'reducerResults' ?

Open hyperlook opened this issue 3 years ago • 3 comments
trafficstars

Description

The raw API 'queryCollection' include this property reducerResults, but the interface CollectionInstance->result: CollectionQueryResult didn't. So It will be hard to use the api notion.getCollectionData to get the page blockIds, any good idea?

This is extremely helpful if someone can fix issues.

Thanks!

from notion-types/src/maps.ts

`export interface CollectionQueryResult { type: CollectionViewType total: number

blockIds: ID[] aggregationResults: Array<AggregationResult>

// only used for board collection views groupResults?: Array<{ value: AggregationResult blockIds: ID[] total: number aggregationResult: AggregationResult }>

collection_group_results?: { type: string blockIds: ID[] hasMore: boolean } }`

hyperlook avatar May 26 '22 07:05 hyperlook

Database support beyond the basics is unfortunately quite limited at the moment. Tracking progress in #260

transitive-bullshit avatar May 27 '22 15:05 transitive-bullshit

I just realized this is happening. So, this would mean any of the filters won't work, right?

pbteja1998 avatar May 27 '22 15:05 pbteja1998

Some filters work, but some of the advanced ones don't.

In general, this is the most complex part of Notion's unofficial API, and it has also seen the most changes over time, so it's difficult to keep in sync w/ notion's functionality.

transitive-bullshit avatar May 27 '22 16:05 transitive-bullshit