1022 Commits

Author SHA1 Message Date
Robert Schäfer
700bdcb8f1 Implement+test unblock mutation 2019-08-13 11:05:29 +02:00
Robert Schäfer
f5a59568ab Implement block except for the unfollow feature 2019-08-13 11:05:29 +02:00
Robert Schäfer
05aee24efd Implement+test User.blockedUsers resolver 2019-08-13 11:05:29 +02:00
Robert Schäfer
b63f6b0ba1 Setup blocked relationships in seeds 2019-08-13 11:05:29 +02:00
Robert Schäfer
f8b37b5c1e Remove obsolete relationship 'BLACKLISTED' 2019-08-13 11:05:29 +02:00
Robert Schäfer
6950068a12 Sketch test for #1054 2019-08-13 11:05:29 +02:00
Wolfgang Huß
bf92a88bf9
Merge pull request #1223 from Human-Connection/remove-mocks
Remove obsolete "MOCKS"
2019-08-09 10:31:42 +02:00
Robert Schäfer
2eaf66378a
Merge pull request #1133 from Human-Connection/384-emotions-on-posts
Emotions on posts
2019-08-09 00:37:38 +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
Robert Schäfer
ff7143dcb1 Remove obsolete "MOCKS"
It's unused code after all and I think we can improve the code base by
removing confusing code.
2019-08-08 20:18:32 +02:00
Matt Rider
fd022c7992 Fix mentions in seeds 2019-08-08 10:19:38 +02:00
Matt Rider
b6975bde89 Add data-mention-id to seeds mentions 2019-08-08 10:07:57 +02:00
Matt Rider
21aa729edb Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1017-send-out-notifications-on-create-omment 2019-08-08 09:10:18 +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
1593eab9cf Merge branch 'master' of github.com:Human-Connection/Human-Connection into 384-emotions-on-posts 2019-08-06 08:07:39 +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
Robert Schäfer
1aeb93f9fb Merge remote-tracking branch 'origin/master' into storybook 2019-08-05 12:47:46 +02:00
Wolfgang Huß
22b9bf77fa Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 1017-send-out-notifications-on-create-omment
# Conflicts:
#	backend/src/schema/resolvers/notifications.spec.js
2019-08-05 10:15:20 +02:00
Matt Rider
295b7e7769 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 384-emotions-on-posts 2019-08-05 09:50:54 +02:00
Matt Rider
97ff2e9457 Make emotionsArray a const, fix lint 2019-08-05 09:50:25 +02:00
Robert Schäfer
26958f6641 Explicitly disallow User.name == null in model 2019-08-03 00:43:18 +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
a6aa974179 Merge remote-tracking branch 'origin/master' into storybook 2019-08-02 14:28:49 +02:00
Robert Schäfer
f1b28c83a0 Meld commits from master 2019-08-02 14:26:06 +02:00
Matt Rider
76a720caec Merge branch 'master' of github.com:Human-Connection/Human-Connection into 384-emotions-on-posts 2019-08-02 08:02:54 +02:00
Robert Schäfer
e1bb6ed74e Fix lint 2019-08-02 01:45:36 +02:00
Matt Rider
fb9a632d55 Query a currentUsers emotions for a post, translations 2019-08-01 15:11:41 +02:00
Robert Schäfer
fdef9db74f Update metascraper-youtube 2019-08-01 14:19:24 +02:00
Robert Schäfer
b6a59460bd Merge remote-tracking branch 'origin/master' into storybook 2019-08-01 12:22:09 +02:00
Robert Schäfer
c9e6d182ec Followed @mattwr18's suggestions here:
https://github.com/Human-Connection/Human-Connection/pull/952#pullrequestreview-269406016
2019-08-01 12:20:33 +02:00
Matt Rider
08899a4af9 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 384-emotions-on-posts 2019-08-01 09:22:57 +02:00
Robert Schäfer
72edf78889 Meld a chaotic commit history into one commit
Some important commit messages:

```
    Fix youtu.be not being embedded

    And also try to maintain the old behaviour matching
    `provider.provider_url`.
```

```
    Remove confusing code comments and obsolete code

    I discovered that the behaviour of no duplicate notifications being send
    out is caused by the frontend: When the editor reads html from the
    backend, it will parse hashtags and mentions as ordinary links, not as
    their respective nodes during editing. Also, we don't have to worry
    about duplicate ids being found: The cypher statement will implicitly
    suppress duplicate notification nodes for the same user.

    So let's remove the code to avoid confusing the next developer.
```

```
    Test editor.getHTML()

    I do this because I'm not able to test the content of `this.editor` from
    a wrapper of `vue-test-utils`. If I call `this.editor.getHTML` directly
    and use it as a computed property `renderedContent` to populate a `<div
    v-html="renderedContent" />` this will not work for the embeds. So, my
    current best bet is to test the editor object isolated from a real
    component. ;(
```

```
    Add core-js as explicit dependency

    Because of build errors on Travis.

    See: https://stackoverflow.com/a/55313456

    Remove as soon as this issue is resolved:
    https://github.com/storybookjs/storybook/issues/7591

```

```
    Refactor: Keep Runtime-only builds

    See: https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
```
2019-08-01 00:28:22 +02:00
Robert Schäfer
c65cc3e0e5 Implement+test SocialMedia.ownedBy resolver
Explicitly define `SocialMedia` graphql type and exclude it from
`neo4j-graphql-js`.
2019-07-31 18:07:48 +02:00
Robert Schäfer
448706ab18 Merge remote-tracking branch 'origin/master' into refactor-social-media-backend 2019-07-31 17:36:02 +02:00
Matt Rider
5423412958 Set up UI 2019-07-31 14:58:05 +02:00
Matt Rider
0a98113c2d Add backend tests for RemovePostEmotions 2019-07-30 13:28:30 +02:00
Alina Beck
d83819dae3 add social media back into user resolver 2019-07-29 23:19:09 +02:00
Alina Beck
afe61ce4a2 add social media back into user schema 2019-07-29 22:51:11 +02:00
Alina Beck
c7d72bfdee use apollo test client in social media tests 2019-07-29 17:22:37 +02:00
Alina Beck
e161416eff use neode instance in social media resolver 2019-07-29 17:22:05 +02:00
Alina Beck
355c7c764c remove social media from user resolver 2019-07-29 17:20:36 +02:00
Alina Beck
0e1abad123 adjust social media types to fit new definition 2019-07-29 17:19:13 +02:00
Alina Beck
ab3fea19d5 add SocialMedia model 2019-07-29 17:17:18 +02:00
Alina Beck
4f068116b9 add social media permissions in middleware 2019-07-29 17:16:40 +02:00
Alina Beck
0439b4407b remove social media validations from middleware 2019-07-29 17:16:05 +02:00
Matt Rider
3e43539e23 Set up some backend tests for emotions 2019-07-29 17:08:07 +02:00