Class: GQL::Schema::Parameter

Inherits:
Field
  • Object
show all
Defined in:
lib/gql/schema/parameter.rb

Constant Summary collapse

TYPES =
{
  req:      'required',
  opt:      'optional',
  rest:     'rest',
  keyreq:   'required keyword',
  key:      'optional keyword',
  keyrest:  'keyword rest',
  block:    'block'
}.freeze

Instance Attribute Summary

Attributes inherited from Field

#ast_node, #context, #target, #variables

Instance Method Summary collapse

Methods inherited from Field

build_class, execute, #initialize, #value

Methods included from Mixins::Common

#propagate, #shutdown

Constructor Details

This class inherits a constructor from GQL::Field

Instance Method Details

#scalar_valueObject



19
20
21
# File 'lib/gql/schema/parameter.rb', line 19

def scalar_value
  "#{target[1]} (#{TYPES[target[0]] || target[0]})"
end