Hi Ryan! First off, thanks for the watching the course! Hope it's been helpful 😄
I think you bring up a great question, and the answer definitely can stem from where GraphQL sits in your stack. If it's communicating through an API level, passing through the errors that it receives seems like it should be enough.
In your case, I think, when it's talking directly to a Database Layer I think you encounter this situation frequently. In projects that I've worked on, the ORM layer that we talk to directly communicates a set of errors (such as unique constraint violations) and we have a utility to format the set of errors in a friendly manner for client consumers.
In some projects, having resolvers defined outside of the schema might help for this. If you have a
VideoResolver, for example, with
#delete methods, then you could point your
resolve statements in Mutations towards these resolver methods that communicate to the ORM later and accumulate the set of errors from a given side-effect.
Sorry if this isn't that helpful, unfortunately this definitely can depend on your language runtime for GraphQL as well as the ORMs or Database modules that you're working with.
If you have any more questions, feel free to ask!