Class: GraphqlRails::Attributes::InputTypeParser
- Inherits:
-
Object
- Object
- GraphqlRails::Attributes::InputTypeParser
- Includes:
- TypeParseable
- Defined in:
- lib/graphql_rails/attributes/input_type_parser.rb
Overview
converts string value in to GraphQL type
Constant Summary
Constants included from TypeParseable
TypeParseable::GRAPHQL_BASE_TYPES, TypeParseable::RAW_GRAPHQL_TYPES, TypeParseable::TYPE_MAPPING, TypeParseable::WRAPPER_TYPES
Instance Method Summary collapse
-
#initialize(unparsed_type, subtype:) ⇒ InputTypeParser
constructor
A new instance of InputTypeParser.
- #input_type_arg ⇒ Object
Methods included from TypeParseable
#core_scalar_type?, #graphql_model, #graphql_type_object, #raw_graphql_type?, #unwrapped_scalar_type
Constructor Details
#initialize(unparsed_type, subtype:) ⇒ InputTypeParser
Returns a new instance of InputTypeParser.
13 14 15 16 |
# File 'lib/graphql_rails/attributes/input_type_parser.rb', line 13 def initialize(unparsed_type, subtype:) @unparsed_type = unparsed_type @subtype = subtype end |
Instance Method Details
#input_type_arg ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/graphql_rails/attributes/input_type_parser.rb', line 18 def input_type_arg if list? list_type_arg else unwrapped_type end end |