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
@tothandras Sorry to raise the dead (#66) but do you have a working example of how to get the individual field validation errors for a mutation? The only error graphql seems to give back is "modelName validation failed". I see where mongoose is calling that error but I can't find why it's calling THAT error and not the specific one for the field. Thanks for any help.
Reproduce the Error
GraphQL POST:
// my variables
{
"input": {
"name": ""
}
}
// my mutation
mutation addModel($input: addModelInput!) {
addModel(input: $input) {
changedDepositionEdge {
node {
_id
name
}
}
}
}
Overview of the Issue
@tothandras Sorry to raise the dead (#66) but do you have a working example of how to get the individual field validation errors for a mutation? The only error graphql seems to give back is "
modelName
validation failed". I see where mongoose is calling that error but I can't find why it's calling THAT error and not the specific one for the field. Thanks for any help.Reproduce the Error
GraphQL POST:
Returns:
Input schema(s):
Node version:
6.3.1
Graffiti-Mongoose version:
5.3.0
Related Issues
#66
Suggest a Fix
Does mongoose call multiple errors upon bad validation? Are we only checking for one?
The text was updated successfully, but these errors were encountered: