Alessio
05/08/2018, 2:05 PMPost and Tag, let's say that in an update mutation on Post I need to create a Tag, how can validate the new tag?nilan
05/08/2018, 4:54 PMAlessio
05/09/2018, 6:53 AMPost mutation, the Tag (beign a relation) is not a plain object, but has the input structure like
connect: {id: "xyz"}, same for create, disconnect and so on. So it's not as straightforward as validating the main object. Moreover I have nested relations, so I cannot check them one by one in this way.
I would expect the inner relation to call my Tag mutation resolver and do there all the validations, but instead it is called the main mutation context.db.mutation.createTag, so I can't do checks in the middleAlessio
05/09/2018, 6:55 AM<https://github.com/graphcool/prisma/issues/728>
that would be perfect, but it's a WIP, so how do you suggest I should move in the meantime?nilan
05/09/2018, 9:18 AMconnect: {id: "xyz"} you could define an input field tagId: "xyz" which you then can validate in your own resolverAlessio
05/09/2018, 9:42 AM