summaryrefslogtreecommitdiffstats
path: root/backend/src
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src')
-rw-r--r--backend/src/resolvers/Mutation.js15
-rw-r--r--backend/src/resolvers/Query.js1
2 files changed, 10 insertions, 6 deletions
diff --git a/backend/src/resolvers/Mutation.js b/backend/src/resolvers/Mutation.js
index cde9513..268b348 100644
--- a/backend/src/resolvers/Mutation.js
+++ b/backend/src/resolvers/Mutation.js
@@ -11,13 +11,16 @@ const mutations = {
async signup(parent, args, ctx, info) {
args.email = args.email.toLowerCase();
const password = await bcrypt.hash(args.password, 10);
- const user = await ctx.db.mutation.createUser({
- data: {
- ...args,
- password,
- permissions: { set: ['USER'] },
+ const user = await ctx.db.mutation.createUser(
+ {
+ data: {
+ ...args,
+ password,
+ permissions: { set: ['USER'] },
+ },
},
- });
+ info
+ );
return {
token: jwt.sign({ userId: user.id }, process.env.APP_SECRET),
diff --git a/backend/src/resolvers/Query.js b/backend/src/resolvers/Query.js
index 276f7fa..0cec090 100644
--- a/backend/src/resolvers/Query.js
+++ b/backend/src/resolvers/Query.js
@@ -4,6 +4,7 @@ const { forwardTo } = require('prisma-binding');
const Query = {
items(parent, args, ctx, info) {
+ console.log(args);
return ctx.db.query.items({ ...args }, info);
},