lib/generators/graphql/templates/mutation.erb in graphql-1.8.6 vs lib/generators/graphql/templates/mutation.erb in graphql-1.8.7

- old
+ new

@@ -1,11 +1,14 @@ -class Mutations::<%= mutation_name %> < GraphQL::Schema::RelayClassicMutation - # TODO: define return fields - # return_field :post, Types::PostType +module Mutations + class <%= mutation_name %> < GraphQL::Schema::RelayClassicMutation + # TODO: define return fields + # field :post, Types::PostType, null: false - # TODO: define arguments - # input_field :name, !types.String + # TODO: define arguments + # argument :name, String, required: true - def resolve(**inputs) # TODO: define resolve method + # def resolve(name:) + # { post: ... } + # end end end