* feat(backend): pin more than one post
* add postPinnedCount query, better names for env variable
* add store and mixin for pinned posts counts
* test pinned post store
* context menu for pin posts
* fix typos
* unpin posts is always possible
* feat(backend): pin public group posts
* allow posts in public groups to be pinned by admins
---------
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
* feat(backend): pin more than one post
* add postPinnedCount query, better names for env variable
* add store and mixin for pinned posts counts
* test pinned post store
* context menu for pin posts
* fix typos
* unpin posts is always possible
---------
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
- As blocking is now reciprocal, we do not need another query, we can
use neo4j-graphql-js magic to query for a BLOCKED relationship between
the postAuthor and the currentUser
This is refactoring all our fragments and fixing the warning about an
existing name `user`. Apparently, fragments should have a unique name
globally.
I decided to call `userFragment`, `postFragment` the fragments for one
object and use different names to query for related objects.
I would be glad to learn a better way to handle this.
It's sometimes unbelievable how many bugs you find when doing
refactoring. This time there was some apparent confusion about
`commentsCount` and `commentedCount`. The counters on the post card were
never showing the correct number.
- was throwing an error when trying to update commentsCount because of new implementation by @roschaefer which uses countResolver, but there was no related for commentsCount, it was r... also commentsCount is no longer needed anywhere in the code base, it is commentedCount now
FYI: @Tirokk I think we'll never remove or add new badges through
graphql. Instead, we will seed them manually with direct access to the
database. Therefore I removed the respective mutations and also your
tests regarding permissions.