Skip to content

Instantly share code, notes, and snippets.

@hash32bot
Created December 19, 2018 08:30
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/126adb71ed7c25cd5171dc13148ecd8c to your computer and use it in GitHub Desktop.
Save hash32bot/126adb71ed7c25cd5171dc13148ecd8c to your computer and use it in GitHub Desktop.
Speaker Mutations - non-nullable - [Post] GraphQL with Sinatra (Ruby) - Part 2- Mutations
module SpeakerMutations
Create = GraphQL::Relay::Mutation.define do
name 'CreateSpeaker'
description 'Creates a speaker'
input_field :name, !types.String # note the !
input_field :bio, types.String
input_field :twitterHandle, types.String
input_field :talkTitle, !types.String
# ... rest of the mutation body
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment