-
Notifications
You must be signed in to change notification settings - Fork 68
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 get all comments (any relation) by a user with GraphQL? #209
Comments
Hello @SM2DevLLC, that seems as a feature request. I'll schedule development for this. |
@cyp3rius Sounds good. Thanks! I'm surprised no one else has wanted to show a users comments on a profile page or something like that before. |
@cyp3rius I found a workaround for now. I'll leave this here in case it helps anyone else. This goes in the
|
Thats one of the way here :) If you are using extensions approach. As you already got it for your own purposes, may I ask you to contribute and implement similar approach by adding |
@cyp3rius I would, but I have no idea how. I'm only using GraphQL in my project and this is my first Strapi project. I'm not using routes/controllers/services. I could try and take a look at some point, but i'm not sure where i'd even start with those. |
…ch-comments-by-author feat(api): issue #209 - find all by author
Endpoint + GQL Query published as part of |
@cyp3rius Sorry, didn't see your last message. Yes it does help a lot. Only one issue, how can I get the related item? I'd need to be able to link to the related item and show related details. For example, if the comment is on a blog post, i'd need to show the title of the blog post and link to it. Also, the |
@cyp3rius I add this to my version to allow being able to pull related items.
|
# [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))
I'm trying to get all the comments by a user to show on their profile page, but the GraphQL
findAllFlat
andfindAllInHierarchy
calls require a relation. Is there a way to do this or does anyone know the best way to override the calls to make the relation optional so I can use the author filter only?The text was updated successfully, but these errors were encountered: