Class: GraphQL::Stitching::Util::TypeStructure

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/stitching/util.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(list:, null:, name:) ⇒ TypeStructure

Returns a new instance of TypeStructure.



10
11
12
13
14
# File 'lib/graphql/stitching/util.rb', line 10

def initialize(list:, null:, name:)
  @list = list
  @null = null
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/graphql/stitching/util.rb', line 8

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



28
29
30
# File 'lib/graphql/stitching/util.rb', line 28

def ==(other)
  @list == other.list? && @null == other.null? && @name == other.name
end

#list?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/graphql/stitching/util.rb', line 16

def list?
  @list
end

#non_null?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/graphql/stitching/util.rb', line 24

def non_null?
  !@null
end

#null?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/graphql/stitching/util.rb', line 20

def null?
  @null
end