Skip to content

Instantly share code, notes, and snippets.

@ShopifyEng
Created August 4, 2021 17:40
Show Gist options
  • Save ShopifyEng/7823cb28473626c77a66d637d8af5ba4 to your computer and use it in GitHub Desktop.
Save ShopifyEng/7823cb28473626c77a66d637d8af5ba4 to your computer and use it in GitHub Desktop.
9-Understanding GraphQL for Beginners - Part 3
module Mutations
class NutritionCreate < BaseMutation
argument :food_id, ID, required: true
argument :serving_size, String, required: true
argument :calories, String, required: true
argument :total_fat, String, required: true
argument :trans_fat, String, required: true
argument :saturated_fat, String, required: true
argument :cholesterol, String, required: true
argument :sodium, String, required: true
argument :potassium, String, required: true
argument :total_carbohydrate, String, required: true
argument :dietary_fiber, String, required: true
argument :sugars, String, required: true
argument :protein, String, required: true
argument :vitamin_a, String, required: true
argument :vitamin_c, String, required: true
argument :calcium, String, required: true
argument :iron, String, required: true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment