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
I get the error Expected undefined to be an input type when an additional resolver is executed after a mutation.
The same resolver works perfectly in a query.
This resolver is define in yaml and stitch some data from another source to the type return by the query or the mutation.
To Reproduce
Steps to reproduce the behavior:
Setup with 2 sources. In my case it's a custom GraphQL API in Node and Postgraphile
Add a custom resolver to your .meshrc with an additional type def to a type you can query and create (for the mutation) on the custom GraphQL API server.
Make sure it's working by executing the query
Check the mutation, it should fail with Expected undefined to be an input type
The issue seems to come from the context.Database.Query.asset function.
If I replace the functions and return directly a dummy object (eg {name: "hello"} ) it's working.
The text was updated successfully, but these errors were encountered:
I have a similar issue running a custom resolver across 2 sources (1 query + 1 mutation).
This issue happens when I pass a variable to the initial request. This variable is passed to the subgraph creating a new operation that fails (certainly because the schema doesn't match the current type of the data anymore).
Describe the bug
I get the error
Expected undefined to be an input type
when an additional resolver is executed after a mutation.The same resolver works perfectly in a query.
This resolver is define in yaml and stitch some data from another source to the type return by the query or the mutation.
To Reproduce
Steps to reproduce the behavior:
.meshrc
with an additional type def to a type you can query and create (for the mutation) on the custom GraphQL API server.Expected undefined to be an input type
Here is my partial
.meshrc
:The query looks like (working):
The not working mutation:
If I remove
makerAsset
, then it's working:Environment:
Additional context
I tried to replace the additional resolver with the typescript version but got the same problem.
The issue seems to come from the
context.Database.Query.asset
function.If I replace the functions and return directly a dummy object (eg
{name: "hello"}
) it's working.The text was updated successfully, but these errors were encountered: