20 Commits

Author SHA1 Message Date
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
cb7217f5a7 Fix bug
- apollo query fetchPolicy set to no-cache so that it will refetch a post's emotions count on page transition
2019-08-06 08:05:35 +02:00
Matt Rider
3da986518e Write component tests, refactor 2019-08-02 10:52:36 +02:00
Matt Rider
daaa979c99 Remove request for image
- we do not need to request it and if there is none it throws an error
2019-07-03 16:20:30 -03:00
Matt Rider
b034d22732 Fix failing cypress test 2019-07-01 18:50:24 -03:00
Matt Rider
f302961376 Get categories working with UpdatePost, refactor 2019-07-01 18:00:55 -03:00
Matt Rider
b8ea32cfc1 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 778-categories-for-posts 2019-07-01 15:06:52 -03:00
Matt Rider
e06b05af90 Remove request for categories from CreatePost 2019-06-29 13:09:48 -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
07576d084c Get categories working with CreatePost 2019-06-26 15:59:57 -03:00
Matt Rider
be70088dd7 Get imageUpload working for Posts 2019-06-20 17:05:47 -03:00
Wolfgang Huß
23185fa29e Fix a problem in PostMutations.js which came in through merging the master 2019-06-14 20:25:25 +02:00
Wolfgang Huß
68dcbacaff Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 734-authorization-problem-disabling-post
# Conflicts:
#	webapp/components/ContributionForm/index.vue
#	webapp/graphql/PostMutations.js
2019-06-14 19:02:33 +02:00
Wolfgang Huß
472bfc2a88 Used PostMutations in PostHelpers now
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-06-14 18:44:56 +02:00
Wolfgang Huß
45bd1299ce Rewrote the PostHelpers and put them in a utils folder 2019-06-14 10:37:43 +02:00
Matt Rider
5986ab2070 Create Posts with a specified language, or fallback 2019-06-10 17:12:00 -03:00
5202763dd8
frontend lint fixes 2019-05-23 19:40:39 +02:00
Robert Schäfer
c91a61af89 Merging webapp to master 2019-03-20 21:06:17 +01:00