Skip to content

Instantly share code, notes, and snippets.

@valikos
Created May 7, 2019 19:47
Show Gist options
  • Save valikos/99737d58977873cf5618b7aa469cf157 to your computer and use it in GitHub Desktop.
Save valikos/99737d58977873cf5618b7aa469cf157 to your computer and use it in GitHub Desktop.
module Types::Interfaces::Node
include Types::BaseInterface
field :id, ID, null: false
end
module Types::Interfaces::Person
include Types::BaseInterface
field :first_name, String, null: false
field :last_name, String, null: true
end
module Types
class CharacterType < BaseObject
implements Types::Interfaces::Node
implements Types::Interfaces::Person
field :friends, [Types::CharacterType], null: true do
argument :last, Integer, required: false
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment