You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!isInputType(varType)) {
// Must use input types for variables. This should be caught during
// validation, however is checked again here for safety.
const varTypeStr = print(varDefNode.type);
onError(
new GraphQLError(
`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`,
{ nodes: varDefNode.type },
),
);
continue;
}
varType is undefined as it cannot be found in the schema.
In an older version of Mesh/OpenAPI handler that I was using, I saw that the schema being passed to the execution layer is the correct transformed schema, which confirms my suspicion the problem is the schema passed to value.ts of GraphQL.js.
The text was updated successfully, but these errors were encountered:
The rough structure of
.meshrc.yml
is:The error that I get comes from:
https://github.com/graphql/graphql-js/blob/505d096cf6586dc9af0eee50217683d9dd619b53/src/execution/values.ts#L88
varType
isundefined
as it cannot be found in the schema.After some debugging, I realized the culprit to be:
https://github.com/Urigo/graphql-mesh/blob/3922733355cbb7aa6432a718399da740a34c0ce6/packages/handlers/openapi/src/index.ts#L117
The schema passed from here to the execution layer of GraphQL code is the one that is generated before any transformation is applied. And so any renamed input in the
.meshrc.yml
are not able to be found in the pre-transformed schema, and hence we I get the above mentioned error.In an older version of Mesh/OpenAPI handler that I was using, I saw that the schema being passed to the execution layer is the correct transformed schema, which confirms my suspicion the problem is the schema passed to
value.ts
of GraphQL.js.The text was updated successfully, but these errors were encountered: