diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-03-28 15:22:34 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-03-28 15:22:34 -0400 |
| commit | 65c524251d49ade9d44a62337f3c1c1fed6eedd0 (patch) | |
| tree | d504ba9cea8d89bbde4b2e809fddb048bd660548 /backend/src/resolvers/Query.js | |
| parent | a1fd7eb33bb08610aaf381a64b7f963cd98bfdaa (diff) | |
Permissions
Diffstat (limited to 'backend/src/resolvers/Query.js')
| -rw-r--r-- | backend/src/resolvers/Query.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/src/resolvers/Query.js b/backend/src/resolvers/Query.js index 2aa4f5c..e69a671 100644 --- a/backend/src/resolvers/Query.js +++ b/backend/src/resolvers/Query.js @@ -24,6 +24,7 @@ const Query = { async orders(parent, args, ctx, info) { const userId = getUserId(ctx); + console.log(info); return ctx.db.query.orders( { where: { @@ -33,6 +34,12 @@ const Query = { info ); }, + + async users(parent, args, ctx, info) { + console.log('TODO: check their permissions'); + const userId = getUserId(ctx); + return ctx.db.query.users({}, info); + }, }; module.exports = Query; |
