summaryrefslogtreecommitdiffstats
path: root/backend/src/resolvers/Query.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-02-13 13:19:23 -0500
committerWes Bos <wesbos@gmail.com>2018-02-13 13:19:23 -0500
commitfa3ec3299b3fa33e5a699683beb96cfa4e6dd51d (patch)
tree601b4ff9650cd17a6d4181fc5982b401411d2a6a /backend/src/resolvers/Query.js
parente0d0baa75ec0bf617f91b6cd779305d4009cae12 (diff)
getting there
Diffstat (limited to 'backend/src/resolvers/Query.js')
-rw-r--r--backend/src/resolvers/Query.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/src/resolvers/Query.js b/backend/src/resolvers/Query.js
index e6ea299..8649e43 100644
--- a/backend/src/resolvers/Query.js
+++ b/backend/src/resolvers/Query.js
@@ -31,6 +31,7 @@ const Query = {
},
me(parent, args, ctx, info) {
+ console.l('me!');
const Authorization = ctx.request.get('Authorization');
if (!Authorization || Authorization === 'null') {
console.log('Authorization is null');
@@ -39,6 +40,12 @@ const Query = {
const id = getUserId(ctx);
return ctx.db.query.user({ where: { id } }, info);
},
+ async orders(parent, args, ctx, info) {
+ console.l('--------------------FETCHING ORDERS---------------------');
+ console.log(args);
+ return ctx.db.query.orders({}, info);
+ console.l('--------------------FETCHING ORDERS---------------------');
+ },
};
module.exports = Query;