diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-06-18 16:17:23 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-06-18 16:17:23 -0400 |
| commit | 14caed5d15b3601bb91a5f4a688fbdfba38cf321 (patch) | |
| tree | eea3604dcda517832fc60120bb38c69430f8d17d /finished-application/backend/src/resolvers | |
| parent | e9682b7b418eaf77bc2137e81edf32786e2ca1d3 (diff) | |
updates
Diffstat (limited to 'finished-application/backend/src/resolvers')
| -rw-r--r-- | finished-application/backend/src/resolvers/Mutation.js | 9 |
1 files changed, 5 insertions, 4 deletions
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 |
