theom
11/21/2018, 11:25 AMconst UPDATE_ITEM_MUTATION = gql`
mutation updateItem_mutation($id: ID!, $quantity: Int){
updateItem(
data: {
quantity: $quantity
}
where: {
id: $id
}
) {
id
quantity
}
}
`;
const { client } = this.props;
const updateItemMutation = (itemID, quantityValue) => {
const id = itemID;
const quantity = quantityValue;
console.log('item id = ', id);
console.log('quantity = ', quantity);
client.mutate({
mutation: UPDATE_ITEM_MUTATION,
variables: {
id,
quantity,
},
}).catch(this.handleSubmitError);
}
What am I overlooking here?notrab
11/21/2018, 11:31 AM400
? Does your terminal output an error when you start the server or on that request?theom
11/21/2018, 11:53 AMnotrab
11/21/2018, 11:53 AMnotrab
11/21/2018, 11:53 AMnotrab
11/21/2018, 11:54 AMtheom
11/21/2018, 11:57 AMnotrab
11/21/2018, 11:58 AMupdateItem
?notrab
11/21/2018, 11:58 AMnotrab
11/21/2018, 11:59 AMtheom
11/21/2018, 12:06 PMupdateItem(id: ID!, title: String, description: String, mainDescription: String, price: Int, quantity: Int): Item!
theom
11/21/2018, 12:11 PMtheom
11/21/2018, 1:22 PMupdateItem(data: ItemUpdateInput!, where: ItemWhereUniqueInput!): Item
Novalis
11/21/2018, 1:27 PMtheom
11/21/2018, 1:57 PM<https://www.prisma.io/docs/reference/prisma-api/mutations-ol0yuoz6go#nested-mutations>
Thank you.