I have a GraphQL .Net Core server and queries resolve wonderfully. Mutations however are failing with this error.
"message": "Expected non-null value, resolve delegate return null for "$GraphQLCore.Types.SInputType"",
I understand that you do not reuse your query types for mutations and I have created separate types but I’m still missing something.
public class SInputType : InputObjectGraphType
{
public SInputType()
{
Field<IntGraphType>("sid");
...etc
}
}
public class SUpdateMutation : ObjectGraphType
{
MutationMock mm = new MutationMock();
public SUpdateMutation()
{
Field<SInputType>(
"createSrecord",
arguments: new QueryArguments(new QueryArgument<SInputType>
{ Name = "sticker"}),
resolve: context => {
var _stik = context.GetArgument<SModel>("stick");
return mm.StockMutation(stick);
});
}
}
Everything I come up with on Google is related to NOT using a InputObjectGraphType but I am and from the examples I see I am using it correctly.
What can I try next?