655 Commits

Author SHA1 Message Date
Grzegorz Leoniec
c27204d56e
Merge branch 'master' into distinct-shouts-and-follows 2019-03-05 12:54:24 +01:00
Grzegorz Leoniec
d7b1ea88c4
Fixed shouts and follows 2019-03-05 11:18:59 +01:00
Grzegorz Leoniec
e2add5a730
Added (un)shout and (un)follow mutations 2019-03-05 10:56:47 +01:00
Grzegorz Leoniec
303e1f399f
Merge pull request #203 from Human-Connection/27_fix_disabled_deleted_on_mutation
Fix current build
2019-03-04 21:55:15 +01:00
Robert Schäfer
180491c08c Put isAuthor in permissions middleware
I find it dirty to access the database in a middleware, ie. I would like
to put all access on the database as close to the resolver as possible.
However, in this case that would mean to put the authorization check in
the resolver, where nobody expects it to be.

CC @appinteractive
2019-03-04 19:43:24 +01:00
Robert Schäfer
b64ea75011 Add a deleted post and a disabled post to seeds 2019-03-04 18:41:05 +01:00
Robert Schäfer
c869724d29 Let all tests pass 💚 2019-03-04 18:41:05 +01:00
Robert Schäfer
b2520258a3 Improve specification of posts resolver
* only authors are alllowed to update/delete their own posts
* set disabled+deleted to false if not provided
2019-03-04 18:41:05 +01:00
Grzegorz Leoniec
cbf697c031
Merge remote-tracking branch 'origin/master' into distinct-shouts-and-follows 2019-03-04 17:37:23 +01:00
Grzegorz Leoniec
4d0af7688d
Merge pull request #192 from Human-Connection/27_disable_posts
Show disabled or deleted posts for moderators
2019-03-04 15:55:38 +01:00
Grzegorz Leoniec
9d1c1e76a8
Merge branch 'master' into distinct-shouts-and-follows 2019-03-04 15:51:42 +01:00
Robert Schäfer
82bbdd12c4
Merge branch 'master' into 27_disable_posts 2019-03-04 15:35:46 +01:00
Robert Schäfer
f496b3f329
Merge pull request #202 from Human-Connection/dependabot/npm_and_yarn/eslint-5.15.0
Bump eslint from 5.14.1 to 5.15.0
2019-03-04 15:35:24 +01:00
dependabot[bot]
b23380d593
Bump eslint from 5.14.1 to 5.15.0
Bumps [eslint](https://github.com/eslint/eslint) from 5.14.1 to 5.15.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/v5.14.1...v5.15.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 04:21:10 +00:00
Grzegorz Leoniec
f39e27c47c
Added followedByCurrentUser and shoutedByCurrentUser 2019-03-03 19:29:40 +01:00
Grzegorz Leoniec
257183ac3f
added currentUserId to cypher params 2019-03-03 19:29:25 +01:00
Grzegorz Leoniec
83b36e8e35
Output distinct counts 2019-03-03 15:55:11 +01:00
dependabot[bot]
802736e562
Merge pull request #183 from Human-Connection/dependabot/npm_and_yarn/@babel/core-7.3.4 2019-03-03 14:40:23 +00:00
Robert Schäfer
4a64755df7
Merge branch 'master' into 27_disable_posts 2019-03-03 15:27:27 +01:00
Robert Schäfer
cb78a30195 Merge remote-tracking branch 'origin/master' into dependabot/npm_and_yarn/@babel/core-7.3.4 2019-03-03 15:27:02 +01:00
Robert Schäfer
db30f4d2d4
Merge pull request #195 from Human-Connection/194-create-unit-test-for-badges
[WIP] Write API test badge creation
2019-03-03 15:22:21 +01:00
Robert Schäfer
c4b9d9011b
Merge branch 'master' into 194-create-unit-test-for-badges 2019-03-03 14:34:53 +01:00
Robert Schäfer
8d1eb6026a Let all tests pass 💚 2019-03-03 14:35:08 +01:00
Robert Schäfer
fb2b407be0 Extend @Tirokk 's test to Create and Update 2019-03-03 14:32:29 +01:00
Robert Schäfer
f25708875a Refactor badges test
CC @Tirokk @grenzfrequence

* the top level block should correspond with the name of the resolver
  * the block below should be `CreatePost` or `UpdatePost`
* the arguments of client.request are `query/mutation`, `variables` but
  you passed in the `headers` which should go into `new
  GraphQlClient(host, options)`
* re-use the very same mutation to avoid bugs in the tests
* use `await expect(someAsyncMethod).resolves.toEqual(expected)` style for
  extra test assurance
2019-03-03 14:01:50 +01:00
Robert Schäfer
44a4e3e32f
Merge branch 'master' into 27_disable_posts 2019-03-03 13:34:22 +01:00
Wolfgang Huß
6937c60ef8 Only admins are allowed to create badges 2019-03-01 15:49:11 +01:00
Wolfgang Huß
d8502ef3a9 Merge branch '194-create-unit-test-for-badges' of https://github.com/Human-Connection/Nitro-Backend into 194-create-unit-test-for-badges 2019-03-01 13:55:20 +01:00
Wolfgang Huß
6271c6e8a3 Add to .gitignore .DS_Store (#196) 2019-03-01 13:38:14 +01:00
Wolfgang Huß
ec64811379 Add to .gitignore .DS_Store 2019-03-01 13:17:07 +01:00
Wolfgang Huß
20b5cd521b Merge branch 'master' of https://github.com/Human-Connection/Nitro-Backend 2019-03-01 11:57:24 +01:00
Matt Rider
5e592f666b Write unit test badge creation
- for unauthenticated
- for authenticated admin

Co-authored-by: Wolfgang Huss <wolle.huss@pjannto.com>
2019-02-28 16:16:14 -03:00
Robert Schäfer
8febf147ce Fix lint 2019-02-28 18:37:52 +01:00
Robert Schäfer
f3ab671f21 Soft delete middleware test passes 2019-02-28 18:37:52 +01:00
Robert Schäfer
911500a3bd Don't override given { deleted, disabled } = args
@appinteractive I guess this was done unintentionally?
2019-02-28 18:37:52 +01:00
Robert Schäfer
738ba4f51c DRY softDeleteMiddleware 2019-02-28 18:37:52 +01:00
Robert Schäfer
ce28de893b Write a test for #27
Moderators are allowed to see disabled or deleted posts if they
ask for it.
2019-02-28 18:37:52 +01:00
Grzegorz Leoniec
086345cd35
Merge pull request #187 from Human-Connection/194_stop_decoding_jwt_on_frontend
Implement currentUser query
2019-02-28 14:33:12 +01:00
Grzegorz Leoniec
9427f3937f
Merge branch 'master' into 194_stop_decoding_jwt_on_frontend 2019-02-28 12:23:55 +01:00
dependabot[bot]
6933657530
Merge pull request #184 from Human-Connection/dependabot/npm_and_yarn/@babel/preset-env-7.3.4 2019-02-28 09:40:06 +00:00
dependabot[bot]
57c24f62d1
Bump @babel/preset-env from 7.3.1 to 7.3.4
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.3.1 to 7.3.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.3.1...v7.3.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-28 09:25:48 +00:00
dependabot[bot]
4152a2e393
Merge pull request #186 from Human-Connection/dependabot/npm_and_yarn/apollo-server-testing-2.4.8 2019-02-28 09:21:42 +00:00
dependabot[bot]
4b2ca9368b
Bump apollo-server-testing from 2.4.2 to 2.4.8
Bumps [apollo-server-testing](https://github.com/apollographql/apollo-server) from 2.4.2 to 2.4.8.
- [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.4.2...apollo-server-testing@2.4.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-28 08:58:00 +00:00
dependabot[bot]
e95d6d4ce3
Merge pull request #193 from Human-Connection/dependabot/npm_and_yarn/apollo-cache-inmemory-1.5.1 2019-02-28 08:52:22 +00:00
Grzegorz Leoniec
88e5f36f6c
Merge branch 'master' into 194_stop_decoding_jwt_on_frontend 2019-02-28 09:49:15 +01:00
Wolfgang Huß
d4a85cfbc1 Merge branch 'master' of https://github.com/Human-Connection/Nitro-Backend 2019-02-28 09:35:57 +01:00
dependabot[bot]
e74962a2be
Bump apollo-cache-inmemory from 1.5.0 to 1.5.1
Bumps [apollo-cache-inmemory](https://github.com/apollographql/apollo-client) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/apollographql/apollo-client/releases)
- [Changelog](https://github.com/apollographql/apollo-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-client/compare/apollo-cache-inmemory@1.5.0...apollo-cache-inmemory@1.5.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-28 04:29:33 +00:00
dependabot[bot]
a3a8c9d7cb
Merge pull request #185 from Human-Connection/dependabot/npm_and_yarn/apollo-server-2.4.8 2019-02-27 23:10:59 +00:00
mattwr18
659a5d5ef8
Merge branch 'master' into 194_stop_decoding_jwt_on_frontend 2019-02-27 18:07:23 -03:00
dependabot[bot]
85a702c8de
Bump apollo-server from 2.4.2 to 2.4.8
Bumps [apollo-server](https://github.com/apollographql/apollo-server) from 2.4.2 to 2.4.8.
- [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.4.2...apollo-server@2.4.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-27 20:54:07 +00:00