Skip to content

Instantly share code, notes, and snippets.

@ShopifyEng
Created August 5, 2021 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShopifyEng/ea4f05cf7b81610270f51fadfc47d205 to your computer and use it in GitHub Desktop.
Save ShopifyEng/ea4f05cf7b81610270f51fadfc47d205 to your computer and use it in GitHub Desktop.
19 - Understanding GraphQL for Beginners - Part 3
mutation {
nutritionCreate(input: {
foodId: 4,
servingSize: "100 g",
calories: "237 g",
totalFat: "11 g",
saturatedFat: "3.8 g",
transFat: "0 g",
cholesterol: "0 mg",
sodium:"266 mg",
potassium: "65 mg",
totalCarbohydrate: "34g",
dietaryFiber: "1.6 g",
protein: "1.9 g",
sugars: "36 g",
vitaminA: "0%",
vitaminC: "0%",
iron: "6%",
calcium:"1%",
}) {
id
calories
foodId
}
}
{
"data": {
"nutritionCreate": {
"id": "4",
"calories": "237 g",
"foodId": 4
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment