Class: Stardust::GraphQL::InputObject
- Inherits:
-
GraphQL::Schema::InputObject
- Object
- GraphQL::Schema::InputObject
- Stardust::GraphQL::InputObject
- Defined in:
- lib/stardust/graphql/input_object.rb
Class Method Summary collapse
Class Method Details
.argument(name, type, description = nil, **kwargs, &block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/stardust/graphql/input_object.rb', line 5 def self.argument(name, type, description = nil, **kwargs, &block) @__types_to_lookup__ ||= [] @__types_to_lookup__ << ->(klass) { actual_type = Collector.lookup_type(type) klass .method(:argument) .super_method .call(name, actual_type, description, **kwargs, &block) } end |
.replace_types! ⇒ Object
19 20 21 |
# File 'lib/stardust/graphql/input_object.rb', line 19 def self.replace_types! @__types_to_lookup__.each {|lookup| lookup.(self)} end |