On the Server

GraphQL is incredibly powerful, but it isn’t magic. GraphQL query documents can be flexible because the server holds a complete schema describing the shape of data that the API models and the input that it can expect from clients. This means that you, as the API developer, are responsible for accurately building a representation of your data. If this sounds like a lot of work, take heart in that it means the GraphQL server can free you up from more mundane details being mixed into your business logic.

We’ll get into the nitty gritty of how GraphQL schemas are built in the next chapter, but let’s take a look at one of the more important benefits that providing one gives us automatically: user input validation. We’ll start ...

Get Craft GraphQL APIs in Elixir with Absinthe now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.