Module: GraphQL::QueryArgument::ClassMethods

Defined in:
lib/graphql/query_argument.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

Instance Method Details

#inherited(base) ⇒ Object



30
31
32
33
# File 'lib/graphql/query_argument.rb', line 30

def inherited(base)
  base.instance_variable_set '@config', @config
  super(base)
end

#query_argument(name, options = {}, &block) ⇒ Object



35
36
37
38
# File 'lib/graphql/query_argument.rb', line 35

def query_argument(name, options = {}, &block)
  argument(name, options)
  config[:query_arguments][name] = block
end