Stumbled upon this entry and here’s my solution after some research. To return a custom message through graphql, you can throw as below as graphql displays that message instead
if (someLogicIsWrong) {
throw new Error('your message here')
}
Stumbled upon this entry and here’s my solution after some research. To return a custom message through graphql, you can throw as below as graphql displays that message instead
if (someLogicIsWrong) {
throw new Error('your message here')
}