Predefine Plugins

Learn about built-in plugins, their types and use.

Built-in Plugins

A plugin in Absinthe is any module that implements the Absinthe.Plugin behaviour. It is not uncommon for a plugin module to implement the Absinthe.Middleware behavior because the two behaviors work together. The middleware callbacks handle changes that need to happen to each field, while the plugin callbacks operate at the document level. We’ll start by looking at two simple plugins built into Absinthe itself. These will help us get the hang of how plugins work, and each has use cases where they’re the perfect tool for the job.

Get hands-on with 1200+ tech skills courses.