Commit Graph

4652 Commits

Author SHA1 Message Date
izzy lyseggen 405964b653 feat(auth-dir): break auth into three directives
@isAuthorized directive for Stream, Branch, and Commit

this is a light wrapper around `authorizeResolver` which finds the
`resourceId` depending on where the request is coming from.
it's still not super cleand and I will continue thinking about how to
improve this despite inconsistencies with the id location
2020-08-14 15:23:41 +01:00
izzy lyseggen 11c357a79f fix(directives): find correct resolver
handle case when default field resolver is not the right one to use
2020-08-14 10:39:45 +01:00
izzy lyseggen ec09927f94 feat(directives): add @hasRole directive 2020-08-12 16:03:13 +01:00
izzy lyseggen 392c95d3e1 fix: remove debug: true
left this in accidentally as subscriptions are not running as debug for
some reason
2020-08-12 16:02:31 +01:00
izzy lyseggen e3f2d73444 feat(subs): add stream updated and deleted subs 2020-08-12 16:01:19 +01:00
izzy lyseggen 8838cfd0e4 feat(subs): throw ForbiddenError if no token 2020-08-12 10:57:14 +01:00
izzy lyseggen 0f1dc6078e fix(directives): typo in hasScope 2020-08-12 10:36:17 +01:00
izzy lyseggen 768ff42a50 refactor(directives): load these nicely 2020-08-12 09:59:07 +01:00
izzy lyseggen 4698612575 feat(subs): copy over regular auth logic for subs 2020-08-11 18:18:35 +01:00
izzy lyseggen cf6c0e4236 feat(subs): pass header token to connection 2020-08-11 18:17:53 +01:00
izzy lyseggen 9d34ac0e95 feat(subs): return stream input from streamCreated 2020-08-11 17:47:47 +01:00
izzy lyseggen fa209157bc feat(subs): add @hasScope dir to streamCreated 2020-08-11 14:39:48 +01:00
izzy lyseggen ee06bdf63d feat(directives): add @hasScope to schema 2020-08-11 14:39:06 +01:00
izzy lyseggen 199e576b9f feat(directives): create HasScopeDirective 2020-08-11 14:36:53 +01:00
izzy lyseggen fee7ffb257 feat(sub): filter stream created sub by owner id 2020-08-07 15:02:57 +01:00
Dimitrie Stefanescu 7b32d39cac feat(subs): added redis pubsubber (shared resource), imported it into stream resolvers 2020-08-06 10:42:36 +01:00
Dimitrie Stefanescu 8f25a6f2fb fix(subs): subscriptions now properly initialising 2020-08-06 10:16:45 +01:00
izzy lyseggen d7b75f9bfb feat(subscriptions): trying to figure out subs
I added a streamCreated sub to try it out,
but I can't get it to connect 😅
2020-08-05 17:17:18 +01:00
izzy lyseggen 1fd132c859 style(eslint): added space-unary-ops rule 2020-08-05 16:35:56 +01:00
Matteo Cominetti 8a33487cd7 Merge pull request #14 from Speckle-Next/matteo/gql
Matteo/gql
2020-07-29 23:48:25 +01:00
Matteo Cominetti 80b293c592 feat(gql): adds tests for stream search and user search 2020-07-29 18:56:58 +01:00
Matteo Cominetti 64279a867d feat(gql): limits set to max=100 and default=25 for streams, users, branches & commits. Additional changes as per PR #14. 2020-07-29 13:10:24 +01:00
Matteo Cominetti e51345cb9e feat(gql): adds streamSearch, adds pagination to userSearch 2020-07-28 16:20:45 +01:00
Matteo Cominetti d2db31381b refractor: fixes indentation 2020-07-28 14:43:01 +01:00
Matteo Cominetti 5f176421ca feat(gql): returns error if limit > 100 2020-07-28 14:38:33 +01:00
Matteo Cominetti 84d28396fe docs 2020-07-27 23:16:49 +01:00
Matteo Cominetti 304397e1ee Merge commit '49f05eac5f6a8af2ae71d9ef650bab2e5c995b9d' into matteo/gql
# Conflicts:
#	readme.md
2020-07-27 23:14:51 +01:00
Matteo Cominetti c6e08b2c5d feat(gql): adds UserSearchResults and improves user search 2020-07-27 23:13:20 +01:00
Dimitrie Stefanescu 49f05eac5f Merge pull request #12 from Speckle-Next/matteo/dev
Matteo/dev
2020-07-26 20:07:32 +01:00
Dimitrie Stefanescu 46e6572ab9 chore(typo & linting): fixed minor typos in readme & linting errors 2020-07-26 20:06:20 +01:00
Matteo Cominetti 8df402e4cb fix(gql): query users, improves validations 2020-07-25 21:21:59 +01:00
Matteo Cominetti 9733cc602d feat(gql): search users wip 2020-07-25 21:04:29 +01:00
Matteo Cominetti f4d236cd63 fix(gql): commitUpdate return type 2020-07-25 14:29:31 +01:00
Dimitrie Stefanescu d7e3df94da Merge pull request #11 from Speckle-Next/dim/gql-integration
Dim/gql integration
2020-07-25 10:55:54 +01:00
Dimitrie Stefanescu 3a3d1a27ba Merge branch 'dim/gql-integration' of https://github.com/Speckle-Next/SpeckleServer into dim/gql-integration 2020-07-25 10:53:19 +01:00
Dimitrie Stefanescu e199e881f2 fix(upload): upload response status changed from 303 (redirect) to 201 (created)
this was confusing clients, which were actually following the redirect 😬
2020-07-25 10:52:55 +01:00
Matteo Cominetti 72c4a430d1 Merge commit 'ea38bd1c771122eeef373802f221f2f35045598c' into matteo/dev 2020-07-23 16:53:35 +01:00
Dimitrie Stefanescu ea38bd1c77 Merge pull request #8 from Speckle-Next/dim/gql-integration
Dim/gql integration
2020-07-22 22:14:30 +01:00
Dimitrie Stefanescu 7662c72af7 Merge branch 'master' into dim/gql-integration 2020-07-22 22:13:20 +01:00
Dimitrie Stefanescu cdb3e969a4 chore(package.json): fixes merge conflicts w/h @izzylys's cross-env fix 2020-07-22 22:12:02 +01:00
Dimitrie Stefanescu 89e8f671c8 test(pass): all tests now pass 🧙‍♂️
increase coverage to >90% (and keep it there). currently at 89.6% - so close
2020-07-22 22:03:51 +01:00
Dimitrie Stefanescu 2208513ccf test(branches): fixed branch services tests 2020-07-22 21:35:03 +01:00
Dimitrie Stefanescu 73a7f2853d test(gql): fixed last gql tests (objects) 2020-07-22 21:31:24 +01:00
Dimitrie Stefanescu f6b1a545e6 feat(gql): implemented stream commit resolver 2020-07-22 21:15:27 +01:00
Matteo Cominetti eb4f7a9a46 fix(graphql): AuthorizationError is not a constructor 2020-07-22 21:07:09 +01:00
Matteo Cominetti 38828dbf2a docs: updated readme 2020-07-22 17:45:03 +01:00
Matteo Cominetti a10ff051e3 docs: updated readme 2020-07-22 12:39:57 +01:00
Dimitrie Stefanescu b14dae6829 feat(gql): implemented resolvers & tests for stream commits & branch commits 2020-07-22 10:58:08 +01:00
Dimitrie Stefanescu 0fe6a0f4af feat(gql): implemented branch query resolvers & tests 2020-07-22 09:38:13 +01:00
Dimitrie Stefanescu a9a77872d2 feat(gql): stream users now returns a custom type - no longer polluting the original
& many other fixes & squashed bugs (stream counts, other users' streams, etc.)
2020-07-21 23:40:42 +01:00