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
18
19
20
21
22
23
# File 'lib/graphql/types/relay/default_relay.rb', line 15

def default_relay?
  if defined?(@default_relay)
    @default_relay
  elsif self.is_a?(Class)
    superclass.respond_to?(:default_relay?) && superclass.default_relay?
  else
    false
  end
end