module GraphQL::Client::Schema::BaseType

Attributes

schema_module[RW]

Internal: Get owner schema Module container.

type[R]

Public: Get associated GraphQL::BaseType with for this class.

Public Instance Methods

cast(value, errors) click to toggle source

Internal: Cast JSON value to wrapped value.

value - JSON value errors - Errors instance

Returns BaseType instance.

# File lib/graphql/client/schema/base_type.rb, line 19
def cast(value, errors)
  raise NotImplementedError, "subclasses must implement #cast(value, errors)"
end
to_list_type() click to toggle source

Internal: Get list wrapper of this type class.

Returns ListType instance.

# File lib/graphql/client/schema/base_type.rb, line 33
def to_list_type
  @list_type ||= ListType.new(self)
end
to_non_null_type() click to toggle source

Internal: Get non-nullable wrapper of this type class.

Returns NonNullType instance.

# File lib/graphql/client/schema/base_type.rb, line 26
def to_non_null_type
  @null_type ||= NonNullType.new(self)
end