Class: ArSerializer::GraphQL::ListTypeClass

Inherits:
TypeClass
  • Object
show all
Defined in:
lib/ar_serializer/graphql/types.rb

Instance Attribute Summary

Attributes inherited from TypeClass

#except, #only, #type

Instance Method Summary collapse

Methods inherited from TypeClass

#description, #fields, from, #initialize, #validate!

Constructor Details

This class inherits a constructor from ArSerializer::GraphQL::TypeClass

Instance Method Details

#association_typeObject



434
435
436
# File 'lib/ar_serializer/graphql/types.rb', line 434

def association_type
  of_type.association_type
end

#collect_types(types) ⇒ Object



430
431
432
# File 'lib/ar_serializer/graphql/types.rb', line 430

def collect_types(types)
  of_type.collect_types types
end

#gql_typeObject



438
439
440
# File 'lib/ar_serializer/graphql/types.rb', line 438

def gql_type
  "[#{of_type.gql_type}]"
end

#kindObject



418
419
420
# File 'lib/ar_serializer/graphql/types.rb', line 418

def kind
  'LIST'
end

#nameObject



422
423
424
# File 'lib/ar_serializer/graphql/types.rb', line 422

def name
  'LIST'
end

#of_typeObject



426
427
428
# File 'lib/ar_serializer/graphql/types.rb', line 426

def of_type
  TypeClass.from type, only, except
end

#sampleObject



442
443
444
# File 'lib/ar_serializer/graphql/types.rb', line 442

def sample
  []
end

#ts_typeObject



446
447
448
# File 'lib/ar_serializer/graphql/types.rb', line 446

def ts_type
  "(#{of_type.ts_type} [])"
end