Class: GraphQLSchema::Field

Inherits:
Object
  • Object
show all
Includes:
Deprecatable, NamedHash, WithArgs
Defined in:
lib/graphql_schema.rb

Instance Method Summary collapse

Methods included from WithArgs

#args, #optional_args, #required_args

Methods included from Deprecatable

#deprecated?, #deprecation_reason

Methods included from NamedHash

#camelize_name, #classify_name, #description, #name, #to_h, #upcase_name

Constructor Details

#initialize(field_hash) ⇒ Field

Returns a new instance of Field.



118
119
120
# File 'lib/graphql_schema.rb', line 118

def initialize(field_hash)
  @hash = field_hash
end

Instance Method Details

#subfields?Boolean

Returns:

  • (Boolean)


126
127
128
# File 'lib/graphql_schema.rb', line 126

def subfields?
  type.subfields?
end

#typeObject



122
123
124
# File 'lib/graphql_schema.rb', line 122

def type
  @type ||= TypeDeclaration.new(@hash.fetch('type'))
end