Server-side GraphQL
Explore how server-side GraphQL manages user input validation through a predefined schema that enforces types and rules. Understand how this approach reduces back-end complexity by filtering invalid requests early, allowing you to focus on core business logic and deliver cleaner API responses.
On server-side
GraphQL query documents can be flexible because the server holds a complete schema that describes the shape of data modeled by the API. It also holds the input that it can expect from clients. As API developers, we are responsible for accurately building a representation of our data. If this sounds like a lot of effort, don’t worry. The GraphQL server deals with the more mundane details in our business logic.
We’ll get into the nitty-gritty of how GraphQL schemas are built in the next chapter. However, let’s take a look at one of the most essential advantages that the GraphQL server provides: user input validation.