Skip to content

Instantly share code, notes, and snippets.

@abepetrillo
Created April 14, 2016 18:43
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 abepetrillo/1c48f964fbf256332297f04608dc06d0 to your computer and use it in GitHub Desktop.
Save abepetrillo/1c48f964fbf256332297f04608dc06d0 to your computer and use it in GitHub Desktop.
module GraphApi
QueryType = GraphQL::ObjectType.define do
name "Query"
description "The query root of this schema"
field :interaction do
type InteractionType
argument :id, !types.ID, "This is the ID of the interaction"
argument :some_obscure_thing, "Quick explanation what this is"
resolve -> (obj, args, ctx) do
Interaction.find(args[:id])
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment