Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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