Anyone know how to apply validations for your schema? Let’s say I have a User which have multiple Posts. Now a Post can be created using createPost and also using createUser (Creating related records). I found this great article to put validations and used it:
https://itnext.io/graphql-mutation-arguments-validation-with-yup-using-graphql-middleware-645822fb748
But there’s a problem. If I need to add validation to Post, I need to put the validation in both Post and User create functions. So, my question is, how to do this properly?