Summary
As in every backend system, handling errors properly is important inside GraphQL-driven servers.
In this chapter, we learned how GraphQL handles errors and how, step by step, we can provide better methods for returning errors. We started by implementing simple enums for error variants and ended with structured error types with union responses.
In the next chapter, we will delve into the art of writing comprehensive documentation both within and beyond the schema.