class ArSerializer::GraphQL::OrTypeClass

Public Instance Methods

collect_types(types) click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 399
def collect_types(types)
  types[:other] = true
  of_types.map { |t| t.collect_types types }
end
gql_type() click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 404
def gql_type
  kind
end
kind() click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 387
def kind
  'OBJECT'
end
name() click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 391
def name
  :other
end
of_types() click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 395
def of_types
  type.map { |t| TypeClass.from t, only, except }
end
sample() click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 408
def sample
  of_types.first.sample
end
ts_type() click to toggle source
# File lib/ar_serializer/graphql/types.rb, line 412
def ts_type
  '(' + of_types.map(&:ts_type).join(' | ') + ')'
end