class GraphQLSchema::Type

Constants

BUILTIN

Public Class Methods

new(type_hash) click to toggle source
# File lib/graphql_schema.rb, line 145
def initialize(type_hash)
  @hash = type_hash
end

Public Instance Methods

builtin?() click to toggle source
# File lib/graphql_schema.rb, line 181
def builtin?
  name.start_with?("__") || BUILTIN.include?(name)
end
enum?() click to toggle source
# File lib/graphql_schema.rb, line 169
def enum?
  kind == 'ENUM'
end
input_object?() click to toggle source
# File lib/graphql_schema.rb, line 161
def input_object?
  kind == 'INPUT_OBJECT'
end
interface?() click to toggle source
# File lib/graphql_schema.rb, line 165
def interface?
  kind == 'INTERFACE'
end
kind() click to toggle source
# File lib/graphql_schema.rb, line 149
def kind
  @hash.fetch('kind')
end
list?() click to toggle source
# File lib/graphql_schema.rb, line 177
def list?
  kind == 'LIST'
end
object?() click to toggle source
# File lib/graphql_schema.rb, line 157
def object?
  kind == 'OBJECT'
end
scalar?() click to toggle source
# File lib/graphql_schema.rb, line 153
def scalar?
  kind == 'SCALAR'
end
union?() click to toggle source
# File lib/graphql_schema.rb, line 173
def union?
  kind == 'UNION'
end