From 14caed5d15b3601bb91a5f4a688fbdfba38cf321 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Mon, 18 Jun 2018 16:17:23 -0400 Subject: updates --- finished-application/backend/src/resolvers/Mutation.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'finished-application/backend/src/resolvers/Mutation.js') diff --git a/finished-application/backend/src/resolvers/Mutation.js b/finished-application/backend/src/resolvers/Mutation.js index 0f1d9ba..80ff3f2 100644 --- a/finished-application/backend/src/resolvers/Mutation.js +++ b/finished-application/backend/src/resolvers/Mutation.js @@ -276,14 +276,15 @@ const mutations = { // 3. convert the items they want to OrderItems const orderItems = user.cart.map(cartItem => { + console.log(cartItem); const orderItem = { quantity: cartItem.quantity, // copy all the item details so it's there forever ...cartItem.item, - item: { - // relationship to the Item incase we need it - connect: { id: cartItem.item.id }, - }, + // item: { + // // relationship to the Item incase we need it + // connect: { id: cartItem.item.id }, + // }, user: { connect: { id: user.id } }, }; // scrub the ID from it because the orderItem will have it's own ID -- cgit v1.3