One more bit of info about my situation. I figured...
# orm-help
d
One more bit of info about my situation. I figured I could do this for the create recipe mutation:
Copy code
mutation 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).