laravel-notion-api
laravel-notion-api copied to clipboard
Using rawFilter on a status property type returns a validation error
Describe the bug
When I use Filter::rawFilter to query a Notion database on a status property type, a validation error is returned.
To Reproduce
Set the filter and send the query:
$filters = new Collection(); $filters->add(Filter::rawFilter("Status", ["status" => [Operators::EQUALS => "Ready"]] ));
$notion = new Notion($access_token)
$rows = $notion->database($id) ->filterBy($filters) ->sortBy($sortings) ->query() ->asCollection();
Expected behavior
A filtered results collection is returned.
Exceptions
Trace can be found here: https://flareapp.io/share/pPv1vqYm#F58
Additional context

Thanks for pointing this out, I could reproduce the error. This is because we are using an older endpoint of the Notion API until now, and status properties came after that. We are working on a concept to allow the usage of different versions of the endpoint, but that makes (automated) testing quite complicated and takes some time.
No worries. And thanks so much for looking into this.
hi @mechelon , do you think this is something that will be supported by your next release? how can we help you for supporting more recent api endpoint?
Hi @ren0v, we basically need to check all implemented API-Endpoints against the currenct version. There were some breaking changes and we want to make sure we don't break any existing functionality.
We have a new test implementation to better test real API-Endpoint and not faked content, however it will take some time to rewrite all existing tests towards that. Hopefully we can finish that up at around August.
You should write at notice this i your README, so we don't spend time on debugging into this. 🤔
Is there any vision on when this will get fixed? Would like to use it.