-
Notifications
You must be signed in to change notification settings - Fork 65
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
How to filter only comments that are not in an thread #201
Comments
Hello @OliveiraCleidson , So step by step :)
It causes 500 because of following error and that's purely Strapi error. I assume the case here is with relation property.
This returned value is our error in reality as we're getting 1:1 from query. I will fix that in next release, but such query is correct.
|
Exists a method that gets only root comments in a request? I can work on this fix. |
Nope, there is no such dedicated method - ideally it should be done by the way you described. If you can fix point 2. we would be grateful :) Should be fairly quick one liner at the end of service method. |
Released as part of |
# [1.1.0](v1.0.2...v1.1.0) (2023-10-04) ### Bug Fixes * add types to Avatar component ([f12ea9c](f12ea9c)) * author blocked props ([d9d0777](d9d0777)) * author population ([VirtusLab-Open-Source#177](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/177)) ([5ba0d85](5ba0d85)) * change error 403 test ([99ec162](99ec162)) * custom field on existing entity ([VirtusLab-Open-Source#178](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/178)) ([5e6cc63](5e6cc63)) * fixed UserAvatar typing ([dd179c7](dd179c7)) * fixes after merge ([3b9eee2](3b9eee2)) * issue [VirtusLab-Open-Source#199](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/199) - undeclared codemirror dependency causes build crash ([ccc1f98](ccc1f98)) * issue [VirtusLab-Open-Source#201](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/201) fix the filtering by thread ([bdc292a](bdc292a)) * issue [VirtusLab-Open-Source#220](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/220), issue [VirtusLab-Open-Source#221](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/221) ([VirtusLab-Open-Source#222](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/222)) ([03d504a](03d504a)) * load only existing translations ([e0cea8d](e0cea8d)) * package.json outdated ([1ef26e5](1ef26e5)) * peer dependency ([50bd59c](50bd59c)) * stick to older match-sorter dependency following strapi ([70dd408](70dd408)) * strapi 4.13 packages alignment ([VirtusLab-Open-Source#229](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/229)) ([3432cd2](3432cd2)) * strapi v4.7.1 compatibility fix because of dependencies ([563f86c](563f86c)) * unused import removed ([ac7d47f](ac7d47f)) ### Features * **api:** issue [VirtusLab-Open-Source#209](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/209) - find all by author ([e47684a](e47684a)) * author entity props blocking ([VirtusLab-Open-Source#186](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/186)) ([6134f1e](6134f1e)) * basic filters options added to Discover and Reports ([074d23a](074d23a)) * comments custom field [CU-2tn2923] ([VirtusLab-Open-Source#157](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/157)) ([aaac8a0](aaac8a0)), closes [VirtusLab-Open-Source#158](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/158) * create reports page [CU-20rfmkv] ([VirtusLab-Open-Source#153](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/153)) ([15b9b57](15b9b57)) * custom fields on server-side [CU-xhcmx-63] ([VirtusLab-Open-Source#161](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/161)) ([a284d59](a284d59)) * typescripted client service and controllers ([eddd4b3](eddd4b3))
# [1.1.0](v1.0.2...v1.1.0) (2023-10-04) ### Bug Fixes * add types to Avatar component ([f12ea9c](f12ea9c)) * author blocked props ([d9d0777](d9d0777)) * author population ([VirtusLab-Open-Source#177](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/177)) ([5ba0d85](5ba0d85)) * change error 403 test ([99ec162](99ec162)) * custom field on existing entity ([VirtusLab-Open-Source#178](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/178)) ([5e6cc63](5e6cc63)) * fixed UserAvatar typing ([dd179c7](dd179c7)) * fixes after merge ([3b9eee2](3b9eee2)) * issue [VirtusLab-Open-Source#199](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/199) - undeclared codemirror dependency causes build crash ([ccc1f98](ccc1f98)) * issue [VirtusLab-Open-Source#201](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/201) fix the filtering by thread ([bdc292a](bdc292a)) * issue [VirtusLab-Open-Source#220](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/220), issue [VirtusLab-Open-Source#221](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/221) ([VirtusLab-Open-Source#222](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/222)) ([03d504a](03d504a)) * load only existing translations ([e0cea8d](e0cea8d)) * package.json outdated ([1ef26e5](1ef26e5)) * peer dependency ([50bd59c](50bd59c)) * stick to older match-sorter dependency following strapi ([70dd408](70dd408)) * strapi 4.13 packages alignment ([VirtusLab-Open-Source#229](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/229)) ([3432cd2](3432cd2)) * strapi v4.7.1 compatibility fix because of dependencies ([563f86c](563f86c)) * unused import removed ([ac7d47f](ac7d47f)) ### Features * **api:** issue [VirtusLab-Open-Source#209](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/209) - find all by author ([e47684a](e47684a)) * author entity props blocking ([VirtusLab-Open-Source#186](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/186)) ([6134f1e](6134f1e)) * basic filters options added to Discover and Reports ([074d23a](074d23a)) * comments custom field [CU-2tn2923] ([VirtusLab-Open-Source#157](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/157)) ([aaac8a0](aaac8a0)), closes [VirtusLab-Open-Source#158](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/158) * create reports page [CU-20rfmkv] ([VirtusLab-Open-Source#153](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/153)) ([15b9b57](15b9b57)) * custom fields on server-side [CU-xhcmx-63] ([VirtusLab-Open-Source#161](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/161)) ([a284d59](a284d59)) * typescripted client service and controllers ([eddd4b3](eddd4b3))
* add types to Avatar component ([f12ea9c](f12ea9c)) * author blocked props ([d9d0777](d9d0777)) * author population ([VirtusLab-Open-Source#177](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/177)) ([5ba0d85](5ba0d85)) * change error 403 test ([99ec162](99ec162)) * custom field on existing entity ([VirtusLab-Open-Source#178](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/178)) ([5e6cc63](5e6cc63)) * fixed UserAvatar typing ([dd179c7](dd179c7)) * fixes after merge ([3b9eee2](3b9eee2)) * issue [VirtusLab-Open-Source#199](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/199) - undeclared codemirror dependency causes build crash ([ccc1f98](ccc1f98)) * issue [VirtusLab-Open-Source#201](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/201) fix the filtering by thread ([bdc292a](bdc292a)) * issue [VirtusLab-Open-Source#220](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/220), issue [VirtusLab-Open-Source#221](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/221) ([VirtusLab-Open-Source#222](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/222)) ([03d504a](03d504a)) * load only existing translations ([e0cea8d](e0cea8d)) * package.json outdated ([1ef26e5](1ef26e5)) * peer dependency ([50bd59c](50bd59c)) * stick to older match-sorter dependency following strapi ([70dd408](70dd408)) * strapi 4.13 packages alignment ([VirtusLab-Open-Source#229](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/229)) ([3432cd2](3432cd2)) * strapi v4.7.1 compatibility fix because of dependencies ([563f86c](563f86c)) * unused import removed ([ac7d47f](ac7d47f)) * **api:** issue [VirtusLab-Open-Source#209](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/209) - find all by author ([e47684a](e47684a)) * author entity props blocking ([VirtusLab-Open-Source#186](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/186)) ([6134f1e](6134f1e)) * basic filters options added to Discover and Reports ([074d23a](074d23a)) * comments custom field [CU-2tn2923] ([VirtusLab-Open-Source#157](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/157)) ([aaac8a0](aaac8a0)), closes [VirtusLab-Open-Source#158](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/158) * create reports page [CU-20rfmkv] ([VirtusLab-Open-Source#153](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/153)) ([15b9b57](15b9b57)) * custom fields on server-side [CU-xhcmx-63] ([VirtusLab-Open-Source#161](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/161)) ([a284d59](a284d59)) * typescripted client service and controllers ([eddd4b3](eddd4b3))
* add types to Avatar component ([f12ea9c](f12ea9c)) * author blocked props ([d9d0777](d9d0777)) * author population ([VirtusLab-Open-Source#177](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/177)) ([5ba0d85](5ba0d85)) * change error 403 test ([99ec162](99ec162)) * custom field on existing entity ([VirtusLab-Open-Source#178](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/178)) ([5e6cc63](5e6cc63)) * fixed UserAvatar typing ([dd179c7](dd179c7)) * fixes after merge ([3b9eee2](3b9eee2)) * issue [VirtusLab-Open-Source#199](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/199) - undeclared codemirror dependency causes build crash ([ccc1f98](ccc1f98)) * issue [VirtusLab-Open-Source#201](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/201) fix the filtering by thread ([bdc292a](bdc292a)) * issue [VirtusLab-Open-Source#220](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/220), issue [VirtusLab-Open-Source#221](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/221) ([VirtusLab-Open-Source#222](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/222)) ([03d504a](03d504a)) * load only existing translations ([e0cea8d](e0cea8d)) * package.json outdated ([1ef26e5](1ef26e5)) * peer dependency ([50bd59c](50bd59c)) * stick to older match-sorter dependency following strapi ([70dd408](70dd408)) * strapi 4.13 packages alignment ([VirtusLab-Open-Source#229](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/229)) ([3432cd2](3432cd2)) * strapi v4.7.1 compatibility fix because of dependencies ([563f86c](563f86c)) * unused import removed ([ac7d47f](ac7d47f)) * **api:** issue [VirtusLab-Open-Source#209](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/209) - find all by author ([e47684a](e47684a)) * author entity props blocking ([VirtusLab-Open-Source#186](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/186)) ([6134f1e](6134f1e)) * basic filters options added to Discover and Reports ([074d23a](074d23a)) * comments custom field [CU-2tn2923] ([VirtusLab-Open-Source#157](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/157)) ([aaac8a0](aaac8a0)), closes [VirtusLab-Open-Source#158](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/158) * create reports page [CU-20rfmkv] ([VirtusLab-Open-Source#153](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/153)) ([15b9b57](15b9b57)) * custom fields on server-side [CU-xhcmx-63] ([VirtusLab-Open-Source#161](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/161)) ([a284d59](a284d59)) * typescripted client service and controllers ([eddd4b3](eddd4b3))
# [1.1.0](v1.0.2...v1.1.0) (2023-12-20) ### Bug Fixes * add types to Avatar component ([f12ea9c](f12ea9c)) * author blocked props ([d9d0777](d9d0777)) * author population ([VirtusLab-Open-Source#177](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/177)) ([5ba0d85](5ba0d85)) * change error 403 test ([99ec162](99ec162)) * custom field on existing entity ([VirtusLab-Open-Source#178](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/178)) ([5e6cc63](5e6cc63)) * fixed UserAvatar typing ([dd179c7](dd179c7)) * fixes after merge ([3b9eee2](3b9eee2)) * issue [VirtusLab-Open-Source#199](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/199) - undeclared codemirror dependency causes build crash ([ccc1f98](ccc1f98)) * issue [VirtusLab-Open-Source#201](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/201) fix the filtering by thread ([bdc292a](bdc292a)) * issue [VirtusLab-Open-Source#220](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/220), issue [VirtusLab-Open-Source#221](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/221) ([VirtusLab-Open-Source#222](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/222)) ([03d504a](03d504a)) * load only existing translations ([e0cea8d](e0cea8d)) * package.json outdated ([1ef26e5](1ef26e5)) * peer dependency ([50bd59c](50bd59c)) * stick to older match-sorter dependency following strapi ([70dd408](70dd408)) * strapi 4.13 packages alignment ([VirtusLab-Open-Source#229](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/229)) ([3432cd2](3432cd2)) * strapi v4.7.1 compatibility fix because of dependencies ([563f86c](563f86c)) * unused import removed ([ac7d47f](ac7d47f)) ### Features * **api:** issue [VirtusLab-Open-Source#209](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/209) - find all by author ([e47684a](e47684a)) * author entity props blocking ([VirtusLab-Open-Source#186](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/186)) ([6134f1e](6134f1e)) * basic filters options added to Discover and Reports ([074d23a](074d23a)) * comments custom field [CU-2tn2923] ([VirtusLab-Open-Source#157](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/157)) ([aaac8a0](aaac8a0)), closes [VirtusLab-Open-Source#158](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/158) * create reports page [CU-20rfmkv] ([VirtusLab-Open-Source#153](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/153)) ([15b9b57](15b9b57)) * custom fields on server-side [CU-xhcmx-63] ([VirtusLab-Open-Source#161](https://github.com/zrp/uqbar-strapi-plugin-comments/issues/161)) ([a284d59](a284d59)) * typescripted client service and controllers ([eddd4b3](eddd4b3))
How to filter only comments that are not in a thread
I'm working on one feature that gets comments with pagination. I won't get comments sorted by created date and only comments that are root comments, then I'm using the REST API in flat mode.
Bugs (?)
But when I try to filter using
threadOf
the server returns 5xx.When I use
threadOf
with id, thethreadOf
field does not return the correct content innerthreadOf
, but the filter works.When I try to use
threadFirstItemId
My dependencies:
My
plugin.ts
My node version Is 16.17.0
The text was updated successfully, but these errors were encountered: