diff options
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 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; |
