Darryl
07/03/2018, 3:02 PMmutation CreateRecipe {
createRecipe(
name: "..."
instructions: [
"Step 1"
"Step 2"
"Step 3"
]
ingredients: [
{
name: "Rolled Oats"
quantity: 1
}
{
name: "Oat Milk"
quantity: 3
}
]
) {
id
name
}
}
Once that’s fired, it’d grab query for those ingredients, get their nutritional information, multiply it by the quantity (this is the part I’m stuck on with relations), and then add a nutrition object to the stored recipe (containing the totals).