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.
- write tests for userMiddleware
- checks the functionality of nodes/locations middleware
- refactor to not allow users to update to remove their name
debatable whether we want that or not, but we do not allow users to
create accounts with no name, so we should be consistent, before we were
using neode to validate this, but we have are removing neode from
production code, so we must validate ourselves
- collate UpdateUser mutations to one
- I wanted to trigger a build, since we had issues with our build server
today. I think this naming is more in the direction we want to go,
though. Maybe it could be makeShoutsPublic as @alina-beck used for the
translation keys... what do you think @kachulio
@mattwr18 vue-apollo rocks! Taking the time to study the docs is a
rewarding investment.
My first idea was to cache the `unreadNotificationsCount` with Vuex.
But the docs of apollo even suggest to use apollo's local state as a
complete replacement of Vuex:
https://vue-apollo.netlify.com/guide/local-state.html
Then I further investigated why the updated `NOTIFIED` objects won't
update the notification counter. Turns out: They don't have an ID and
the computed property didn't fire when the notifications array would
change. I fixed both in this commit and yes, it works as expected.
No additional code required 💪
- At the moment, the notifications are displayed in a table, and have
the same functionality as the NotificationMenu where you can click on
the title of the Post and visit the Post
- Unsure about the styling, it would kind of be nice to have a more
condensed list to see more notifications per page, but still be able to
click on a row and visit the Post