Skip to content

Instantly share code, notes, and snippets.

@hash32bot
Last active December 25, 2018 15:06
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 hash32bot/c6e1b059827368c59b302f17c3e9e6ff to your computer and use it in GitHub Desktop.
Save hash32bot/c6e1b059827368c59b302f17c3e9e6ff to your computer and use it in GitHub Desktop.
SpeakerMutations 4 - [Post] GraphQL with Sinatra (Ruby) - Part 2- Mutations
require 'graphql'
require_relative 'base_mutation'
class Mutations::CreateSpeaker < Mutations::BaseMutation
description 'Creates a speaker'
# input arguments
field :success, Boolean, null: false
field :errors, [String], null: false
# ...
# resolve function
# ...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment