Module: GraphQL::Query::LiteralInput::LiteralKindCoercers::ListLiteral
- Defined in:
- lib/graphql/query/literal_input.rb
Class Method Summary collapse
Class Method Details
.coerce(value, type, variables) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/graphql/query/literal_input.rb', line 39 def self.coerce(value, type, variables) if value.is_a?(Array) value.map{ |element_ast| LiteralInput.coerce(type.of_type, element_ast, variables) } else [LiteralInput.coerce(type.of_type, value, variables)] end end |