aonomike
785b59f96e
Test filter by followed by
2019-09-10 23:32:55 +03:00
mattwr18
b89043166b
Add backend tests for filtering posts by emotions
...
- Co-authored-by: Mike Aono <aonomike@gmail.com>
2019-09-09 16:35:11 +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
672f19e6d1
More of @mattwr18's suggestions
2019-09-03 21:28:29 +02:00
roschaefer
c4ba2c4aeb
SoftDeleteMiddleware obfuscates deleted resources
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
Matt Rider
cd5e492569
Await relation be added
2019-08-23 12:18:53 +02:00
Matt Rider
773779e5f1
Fix UpdatePost resolver/validations
2019-08-23 10:57:11 +02:00
Matt Rider
8735045d11
Update cypress tests, post query
2019-08-20 20:13:29 +02:00
Matt Rider
555c5254bc
Add tests, validations for too many categories
...
- Co-authored-by: Joseph Ngugi <jngugi88@gmail.com>
2019-08-19 17:31:55 +02:00
kachulio1
314dfcf413
Throw error if no categories on post creation
...
Co-authored-by: mattwr18 <mattwr18@gmail.com>
2019-08-15 17:55:02 +03:00
roschaefer
5103bdbc2a
Fix tests
2019-08-13 11:50:33 +02:00
Robert Schäfer
963cbbef32
RemovePostEmotions should return deleted object
...
@mattwr18 I prefer (I believe it's even best practice) that a delete
mutation should return the deleted object. If you run the delete
mutation again, it should return `null` because there is no object like
that anymore. That way the client knows if a delete mutation has changed
any state in the database.
Also I fixed another bug in the resolver. If your graphql mutation looks
like this:
```gql
mutation {
RemovePostEmotions(to:{ id:"p15"}, data:{emotion: angry}) {
from {
id
name
}
to {
id
title
}
emotion
}
}
```
Then you get errors because your resolver does not return the name for
the user or the title for the post anymore. Just use spread operator...
and it's fixed.
2019-08-08 23:51:26 +02:00
Robert Schäfer
f3e545a913
Fix bug: Only add emotions for authenticated user
2019-08-08 23:10:01 +02:00
Matt Rider
39a94a8aac
Refactor
...
- follow PR review by @roschaefer
2019-08-07 14:55:32 +02:00
Matt Rider
b8e1ae0a1c
Update user ids
2019-08-06 18:57:27 +02:00
Matt Rider
53af29b5a2
Refactor backend tests
...
- to use neode and apollo-server-testing
2019-08-06 18:26:39 +02:00
Matt Rider
d795ee50a9
Add backend tests for custom queries
2019-08-06 10:58:30 +02:00
Matt Rider
d1d82a0051
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 384-emotions-on-posts
2019-08-02 16:55:54 +02:00
Robert Schäfer
e1bb6ed74e
Fix lint
2019-08-02 01:45:36 +02:00
Matt Rider
0a98113c2d
Add backend tests for RemovePostEmotions
2019-07-30 13:28:30 +02:00
Matt Rider
3e43539e23
Set up some backend tests for emotions
2019-07-29 17:08:07 +02:00
Matt Rider
16f077fe65
Add authentication tests for AddPostEmotions, emotionsCount
2019-07-16 11:02:43 -03:00
Matt Rider
0d4617399b
Fix/add tests
2019-07-09 18:29:31 -03:00
Matt Rider
a875fe0d5e
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 967-filter-post-by-category
2019-07-04 20:33:24 -03:00
Matt Rider
c6b261853f
Add test for filter posts by category
2019-07-03 19:46:26 -03:00
Robert Schäfer
10ae4abaae
Use neode to bring User mutations under control
...
This commit takes all backend changes for signup and invite feature. I
was working on these features and removed the generated mutations for
type user along the way.
2019-07-03 15:58:42 +02:00
Matt Rider
f302961376
Get categories working with UpdatePost, refactor
2019-07-01 18:00:55 -03:00
Matt Rider
865e2c0ec3
Refactor resolver, rename params
...
- Use one cypher statement
Co-authored-by: Tirokk <wolle.huss@pjannto.com>
2019-06-28 10:17:22 -03:00
Matt Rider
351f258fab
Refactor resolver, write component tests
...
- use UNWIND instead of iterating over categories(cypher magic)
- do not return nested categories on post creation as it's expensive and we don't use
- refactor backend test
- component tests for CategoriesSelect
2019-06-27 16:57:55 -03:00
Matt Rider
d714927315
Set up backend for Post creation with categories
2019-06-26 11:26:44 -03:00
Matt Rider
4407d6648a
Add component tests, translations
2019-06-11 15:47:10 -03:00
Matt Rider
5986ab2070
Create Posts with a specified language, or fallback
2019-06-10 17:12:00 -03:00
177e33c022
fixed spec include paths
2019-06-03 19:34:58 +02:00
f78c54a3e8
refactored backend structure
2019-05-31 19:31:39 +02:00