Class: GraphQL::Query::FieldResolutionStrategy::ScalarResolutionStrategy
- Inherits:
-
Object
- Object
- GraphQL::Query::FieldResolutionStrategy::ScalarResolutionStrategy
- Defined in:
- lib/graph_ql/query/field_resolution_strategy.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(value, field_type, target, parent_type, ast_field, operation_resolver) ⇒ ScalarResolutionStrategy
constructor
A new instance of ScalarResolutionStrategy.
Constructor Details
#initialize(value, field_type, target, parent_type, ast_field, operation_resolver) ⇒ ScalarResolutionStrategy
Returns a new instance of ScalarResolutionStrategy.
34 35 36 |
# File 'lib/graph_ql/query/field_resolution_strategy.rb', line 34 def initialize(value, field_type, target, parent_type, ast_field, operation_resolver) @result = field_type.coerce(value) end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
33 34 35 |
# File 'lib/graph_ql/query/field_resolution_strategy.rb', line 33 def result @result end |