Fix merging fields with arguments
executeField shouldn't assume that a selection has only one field with a given name, but it should take the first field. The underlying cause is a wrong pattern, which (because of the laziness) is executed only if the field has arguments.
This commit is contained in:
@ -97,7 +97,7 @@ executeField fieldResolver prev fields
|
||||
where
|
||||
executeField' fieldDefinition resolver = do
|
||||
let Out.Field _ fieldType argumentDefinitions = fieldDefinition
|
||||
let (Transform.Field _ _ arguments' _ _ :| []) = fields
|
||||
let Transform.Field _ _ arguments' _ _ = NonEmpty.head fields
|
||||
case coerceArgumentValues argumentDefinitions arguments' of
|
||||
Nothing -> addError null $ Error "Argument coercing failed." [] []
|
||||
Just argumentValues -> do
|
||||
|
Reference in New Issue
Block a user