1080 Commits

Author SHA1 Message Date
Robert Schäfer
a4dc497585
Merge pull request #1448 from Human-Connection/dependabot/npm_and_yarn/backend/apollo-server-testing-2.9.3
Bump apollo-server-testing from 2.9.1 to 2.9.3 in /backend
2019-09-04 01:24:31 +02:00
dependabot-preview[bot]
125a1c8f63
Bump cross-env from 5.2.0 to 5.2.1 in /backend
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kentcdodds/cross-env/compare/v5.2.0...v5.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 22:01:57 +00:00
roschaefer
af8475f28e Avoid unavailable posts in relatedContributions 2019-09-03 23:19:55 +02:00
roschaefer
2a544376a3 Delete post.image
In contrast to the other errors, it's better to send `null` for an
image. That way, the browser won't even try to load that url.
2019-09-03 23:19:55 +02:00
roschaefer
64268a1f3c Add locations to seeds, fix shoutedByCurrentUser 2019-09-03 21:28:29 +02:00
roschaefer
00454c874c Remove read-only attributes from posts mutations
For the comments, the fix is not that easy: They are still using
`neo4j-graphql-js` in the resolvers. And that library needs the input
params for the query builder.

See: https://github.com/Human-Connection/Human-Connection/issues/1454
2019-09-03 21:28:29 +02:00
roschaefer
3eea20f7c4 Follow @alinabeck's suggestions 2019-09-03 21:28:29 +02:00
roschaefer
672f19e6d1 More of @mattwr18's suggestions 2019-09-03 21:28:29 +02:00
roschaefer
bb3f419532 Refactor graphql queries and fix bug
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.
2019-09-03 21:28:29 +02:00
roschaefer
7b44a87e3b Follow @mattwr18's suggestions 2019-09-03 21:28:29 +02:00
roschaefer
0b3bbb1f14 Delete post.title and obfuscate slug 2019-09-03 21:28:29 +02:00
roschaefer
bd885b1aac Delete emails and social media, bugfix
The bugfix was missing '(' plus a wrong order for the social media
relationship called 'OWNED_BY'.
2019-09-03 21:28:29 +02:00
roschaefer
2b83745f6b You cannot login if your account is deleted 2019-09-03 21:28:29 +02:00
roschaefer
491a626031 Replace deleteComment with a more KISS solution 2019-09-03 21:28:29 +02:00
roschaefer
c4ba2c4aeb SoftDeleteMiddleware obfuscates deleted resources 2019-09-03 21:28:29 +02:00
roschaefer
580c048cfa Remove obsolete report factory 2019-09-03 21:28:29 +02:00
roschaefer
e5be418076 Refactor seeds - no need for a factories server!
Fix #1427
2019-09-03 21:28:29 +02:00
roschaefer
afe47e84c0 Remove the organizations for now
We haven't implemented them at all, so I would prefer not to have
obscure data in the database.
2019-09-03 21:28:29 +02:00
roschaefer
784e1fd911 Fix one more cypress test, implement a factory 2019-09-03 21:28:29 +02:00
roschaefer
4d5769fbc6 Fix cypress tests and factories 2019-09-03 21:28:29 +02:00
roschaefer
76acebbb73 Notifications query filters for deleted resources
This should finally fix #1414
2019-09-03 21:28:29 +02:00
roschaefer
660e3434aa Implement delete of comments when post is deleted 2019-09-03 21:28:29 +02:00
roschaefer
1b5d91bfd2 Refactor post spec, implement soft delete, fix bug
I think the validation for categories was too complex and the graphql
query 'PostEmotionsByCurrentUser' was erroneously allowed for
unauthenticated users.
2019-09-03 21:28:29 +02:00
roschaefer
2033b1791c Fix posts resolver spec 2019-09-03 21:28:29 +02:00
roschaefer
3f5ac61b73 Fix users and report resolver specs
This time I did not refactor the whole tests suites because of time and
complexity of the PR review.
2019-09-03 21:28:29 +02:00
roschaefer
36ba4cc208 Refactor filterBubble spec 2019-09-03 21:28:29 +02:00
roschaefer
2d67c5f172 Refactored entire softDeleteMiddleware spec 2019-09-03 21:28:29 +02:00
roschaefer
0f64bbb71f Soft delete for comments implemented 2019-09-03 21:28:29 +02:00
roschaefer
4bfc0ff2bf Refactor comments.spec, refactor post factory 2019-09-03 21:28:29 +02:00
dependabot-preview[bot]
79455169fa
Bump apollo-server-testing from 2.9.1 to 2.9.3 in /backend
Bumps [apollo-server-testing](https://github.com/apollographql/apollo-server) from 2.9.1 to 2.9.3.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/compare/apollo-server-testing@2.9.1...apollo-server-testing@2.9.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-02 06:10:29 +00:00
mattwr18
3e5a624147
Merge pull request #1445 from Human-Connection/dependabot/npm_and_yarn/backend/apollo-server-2.9.3
Bump apollo-server from 2.9.1 to 2.9.3 in /backend
2019-09-02 08:08:15 +02:00
dependabot-preview[bot]
d64ee198bd
Bump apollo-server from 2.9.1 to 2.9.3 in /backend
Bumps [apollo-server](https://github.com/apollographql/apollo-server) from 2.9.1 to 2.9.3.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/compare/apollo-server@2.9.1...apollo-server@2.9.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-02 04:22:58 +00:00
dependabot-preview[bot]
4367a06315
Bump eslint from 6.2.2 to 6.3.0 in /backend
Bumps [eslint](https://github.com/eslint/eslint) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.2.2...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-02 04:22:15 +00:00
Robert Schäfer
a784bca62f
Merge pull request #1433 from Human-Connection/dependabot/npm_and_yarn/backend/neo4j-driver-1.7.6
Bump neo4j-driver from 1.7.5 to 1.7.6 in /backend
2019-08-30 22:12:07 +02:00
Robert Schäfer
0641320ac1
Merge pull request #1430 from Human-Connection/dependabot/npm_and_yarn/backend/eslint-plugin-node-9.2.0
Bump eslint-plugin-node from 9.1.0 to 9.2.0 in /backend
2019-08-30 22:11:54 +02:00
roschaefer
98194ef54a Follow @mattwr18's suggestions 2019-08-30 16:00:32 +02:00
Matt Rider
fd9a355910 Fix incorrect id in seeds notification
- Jenny Rostok was being notified that someone had mentioned them in p2, when actually it was Peter Lustig who had been mentioned.
2019-08-30 16:00:32 +02:00
roschaefer
cbcba8f08d Follow @Tirokk's suggestion 2019-08-30 16:00:32 +02:00
roschaefer
c29ee5e3d3 Update notifications in place 2019-08-30 16:00:32 +02:00
roschaefer
994ab43950 Change the behaviour how notifications get created
I think it makes more sense to update an existing notification in place.
Ie. if there was already a notification, just mark it as unread so it
ends up in the recipient's notification list again.
2019-08-30 16:00:32 +02:00
roschaefer
bf6e7a8131 Implement fallback resolvers for Post and Comment 2019-08-30 16:00:32 +02:00
roschaefer
9b2c707aa3 DRY notifications resolver 2019-08-30 16:00:32 +02:00
roschaefer
733c2d5ce1 All backend tests pass 2019-08-30 16:00:32 +02:00
roschaefer
3f121c7c4d Refine notification behaviour:
If you mark a post or comment as read even though you already marked the
corresponding notification as read, then you receive `null`.
2019-08-30 16:00:32 +02:00
roschaefer
2846a6a8d3 Spec for notifications passing 2019-08-30 16:00:32 +02:00
roschaefer
cf8ead10f3 Start to refactor backend tests 2019-08-30 16:00:32 +02:00
roschaefer
4b96454b90 Notifications resolver capable of orderBy + filter 2019-08-30 16:00:32 +02:00
roschaefer
643d175ef6 Implement notifications resolver 2019-08-30 16:00:32 +02:00
dependabot-preview[bot]
d78349879d
Bump neo4j-driver from 1.7.5 to 1.7.6 in /backend
Bumps [neo4j-driver](https://github.com/neo4j/neo4j-javascript-driver) from 1.7.5 to 1.7.6.
- [Release notes](https://github.com/neo4j/neo4j-javascript-driver/releases)
- [Commits](https://github.com/neo4j/neo4j-javascript-driver/compare/1.7.5...1.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-30 13:49:20 +00:00
dependabot-preview[bot]
cbfaf292d7
Bump eslint-plugin-node from 9.1.0 to 9.2.0 in /backend
Bumps [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) from 9.1.0 to 9.2.0.
- [Release notes](https://github.com/mysticatea/eslint-plugin-node/releases)
- [Commits](https://github.com/mysticatea/eslint-plugin-node/compare/v9.1.0...v9.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-30 13:48:50 +00:00