Module: GraphQL::Relay::EdgeType
- Defined in:
- lib/graphql/relay/edge_type.rb
Class Method Summary collapse
Class Method Details
.create_type(wrapped_type, name: nil, &block) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/graphql/relay/edge_type.rb', line 4 def self.create_type(wrapped_type, name: nil, &block) GraphQL::ObjectType.define do name("#{wrapped_type.name}Edge") field :node, wrapped_type field :cursor, !types.String block && instance_eval(&block) end end |