Moving On

During this chapter, you’ve learned an important new skill: how to build and use middleware that can modify the way fields are resolved during document execution. You know how to configure middleware on an individual basis, using the middleware/1,2 macros, and at the schema level, using middleware/3. Armed with this knowledge and an understanding of the MapGet middleware that’s used as Absinthe’s default resolution logic, you’re ready to build much more interesting patterns in your Absinthe schemas.

In the next chapter, we’re going to look at a critical use of middleware: securing your application behind authentication and authorization checks.

Before we move on, however, give this challenge a shot:

  1. Build some middleware ...

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.