Module: GraphQL::Types::Relay::DefaultRelay

Defined in:
lib/graphql/types/relay/default_relay.rb

Instance Method Summary collapse

Instance Method Details

#default_relay(new_value) ⇒ Object



11
12
13
# File 'lib/graphql/types/relay/default_relay.rb', line 11

def default_relay(new_value)
  @default_relay = new_value
end

#default_relay?Boolean

Returns:



15
16
17
# File 'lib/graphql/types/relay/default_relay.rb', line 15

def default_relay?
  !!@default_relay
end

#to_graphqlObject



19
20
21
22
23
# File 'lib/graphql/types/relay/default_relay.rb', line 19

def to_graphql
  type_defn = super
  type_defn.default_relay = default_relay?
  type_defn
end