-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Might anyone know what might cause the VariableTypeNotFound error from compileQuery being generated despite, what seems like a valid schema that includes the type requested type definition?
Here is what I'm seeing: The call
let query =
compileQuery
schema
[r|query($vi: RequestInput!) {
wrap { # Object :: Commands.Validate
# (wraps a Field "validate" with Argument "request" :: RequestInput)
validate(request: $vi) {
subReq { subjectType }
meaReqs { measurementType }
}
}
}
|]
... generates a Left error implying a missing type definition
Left (ValidationError (VariableTypeNotFound (Variable (Name {unName = "vi"}))
(Name {unName = "RequestInput"}) :| []))
... despite the definition being present in the successful makeSchema call
-- snippet of the compiled schema
... (Name {unName = "Validate"},TypeDefinitionObject (ObjectTypeDefinition
(Name {unName = "Validate"}) [] (FieldDefinition (Name {unName = "validate"})
[ArgumentDefinition (Name {unName = "request"})
(TypeNonNull (NonNullTypeNamed
(DefinedInputType
(InputTypeDefinitionObject
(InputObjectTypeDefinition
(Name {unName = "RequestInput"}) <<< definition of RequestInput
(InputObjectFieldDefinition (Name {unName ="subReq"}) (TypeNonNull (NonNullTypeNamed (DefinedInputType (InputTypeDefinitionObject (InputObjectTypeDefinition (Name {unName =
"QualityMixInput"}) (InputObjectFieldDefinition (Name {unName = "subjectType"})
(TypeNamed (BuiltinInputType GString)) Nothing :| [InputObjectFieldDefinition
(Name {unName = "qualityMix"}) ... etc.
Thank you to anyone that might have some ideas.
- E
Metadata
Metadata
Assignees
Labels
No labels