Class: Stardust::GraphQL::Types::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/stardust/graphql/types/dsl.rb

Class Method Summary collapse

Class Method Details

.input_object(type, &block) ⇒ Object



15
16
17
# File 'lib/stardust/graphql/types/dsl.rb', line 15

def input_object(type, &block)
  Collector.add_type( type, block, InputObject )
end

.interface(type, &block) ⇒ Object



11
12
13
# File 'lib/stardust/graphql/types/dsl.rb', line 11

def interface(type, &block)
  Collector.add_type( type, block, Interface)
end

.object(type, &block) ⇒ Object



7
8
9
# File 'lib/stardust/graphql/types/dsl.rb', line 7

def object(type, &block)
  Collector.add_type( type, block, Object)
end

.scalar(type, &block) ⇒ Object



19
20
21
# File 'lib/stardust/graphql/types/dsl.rb', line 19

def scalar(type, &block)
  Collector.add_type( type, block, Scalar )
end

.union(type, &block) ⇒ Object



23
24
25
# File 'lib/stardust/graphql/types/dsl.rb', line 23

def union(type, &block)
  Collector.add_type( type, block, Union )
end