Class: ArSerializer::GraphQL::OptionalTypeClass
- Inherits:
-
TypeClass
- Object
- TypeClass
- ArSerializer::GraphQL::OptionalTypeClass
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!
Instance Method Details
#association_type ⇒ Object
367
368
369
|
# File 'lib/ar_serializer/graphql/types.rb', line 367
def association_type
of_type.association_type
end
|
#collect_types(types) ⇒ Object
371
372
373
|
# File 'lib/ar_serializer/graphql/types.rb', line 371
def collect_types(types)
of_type.collect_types types
end
|
#gql_type ⇒ Object
375
376
377
|
# File 'lib/ar_serializer/graphql/types.rb', line 375
def gql_type
of_type.gql_type
end
|
#kind ⇒ Object
355
356
357
|
# File 'lib/ar_serializer/graphql/types.rb', line 355
def kind
of_type.kind
end
|
#name ⇒ Object
359
360
361
|
# File 'lib/ar_serializer/graphql/types.rb', line 359
def name
of_type.name
end
|
#of_type ⇒ Object
363
364
365
|
# File 'lib/ar_serializer/graphql/types.rb', line 363
def of_type
TypeClass.from type.first, only, except
end
|
#sample ⇒ Object
379
380
381
|
# File 'lib/ar_serializer/graphql/types.rb', line 379
def sample
nil
end
|
#ts_type ⇒ Object
383
384
385
|
# File 'lib/ar_serializer/graphql/types.rb', line 383
def ts_type
"(#{of_type.ts_type} | null)"
end
|