Created
April 14, 2016 18:43
-
-
Save abepetrillo/1c48f964fbf256332297f04608dc06d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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