21 Commits

Author SHA1 Message Date
roschaefer
fc367297e3 Get rid of different factory files
..and fix some cypress tests
2020-01-28 23:12:50 +01:00
roschaefer
2a79c53765 Refactor user factory 2020-01-28 22:43:26 +01:00
roschaefer
b063847849 refactor: Make db:setup init stage of migrate 2020-01-20 11:00:52 +01:00
mattwr18
79d23cc6de Merge branch 'master' of github.com:Human-Connection/Human-Connection into 2412-favor-transaction-function 2019-12-11 10:56:42 +01:00
mattwr18
da150e0b27 Refactor notificationsMiddleware
- Use transaction functions
- extract validations into validationsMiddleware
- break notifyUsers into notifyUsersOfMention/notifyUsersOfComment
2019-12-06 14:48:32 +01:00
roschaefer
8f0ce19f09 Implement getDriver() and getNeode() the same way
I want to introduce `neode` and `neo4j-graphql-js` to my students and
saw this.
2019-12-05 21:00:24 +01:00
mattwr18
1827889582 Refactor notificationsMiddleware/locations
- start refactoring
- locations does not have any automated tests, which makes it more
difficult to refactor and have confidence that functionality will not be
broken
- notificationsMiddleware in progress
2019-12-05 20:42:45 +01:00
mattwr18
ace7818eac Update test description
- the test clearly tests that the createdAt doesn't change, we changed
the implementation, but didn't change the test description
2019-12-04 19:56:49 +01:00
roschaefer
978347ba7b Tell github-linguists to ignore snapshots 2019-11-16 20:09:05 +01:00
roschaefer
cbc547a86b refactor: small refactoring for readability
@KapilJ your solution is right now the best solution, I think. Probably
the ideal solution would be if we could implement the `CreateComment`
resolver in such a way that it is doing eager loading of the
`comment->post->author` relationship and resolving a commment object
which has the required objects all set. Then you wouldn't have to
refetch all the stuff.

But I think this is OK for now 👍
2019-10-31 16:11:05 +01:00
Kapil Jain
b4a9e3e551 add software tests for two notifications bug 2019-10-31 05:08:15 -04:00
Kapil Jain
c21ad2244f add software tests for two notifications bug 2019-10-30 22:03:52 -04:00
Kapil Jain
063ff17d8b add software tests for two notifications bug 2019-10-30 20:39:50 -04:00
mattwr18
16d7e6c91a Update notifications
- create only one relationship by using merge, but do not update
createdAt attribute/update test
- order by updatedAt_desc
2019-09-13 20:14:47 +02:00
mattwr18
ce487f1e0f Set notifications.createdAt only at creation
- we should not be setting it every time a notification is created
2019-09-13 20:14:47 +02:00
roschaefer
98194ef54a Follow @mattwr18's suggestions 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
733c2d5ce1 All backend tests pass 2019-08-30 16:00:32 +02:00
Wolfgang Huß
af968461b6 Split handleNotificationsMiddleware in notificationsMiddleware and hashtagsMiddleware 2019-08-26 16:24:43 +02:00