# AbsinthePermission v1.0.0 - Table of Contents

> Declarative, schema-first authorization middleware for Absinthe GraphQL. Auth rules live next to the field they protect.

## Pages

- [AbsinthePermission](readme.md)
- [Changelog](changelog.md)
- [AGENTS.md — absinthe_permission cookbook for AI coding agents](agents.md)

## Modules

- [AbsinthePermission.Load](AbsinthePermission.Load.md): Declares a piece of data to fetch before a rule is evaluated.

- Core API
  - [AbsinthePermission](AbsinthePermission.md): Declarative, schema-first authorization for Absinthe GraphQL.
  - [AbsinthePermission.Middleware](AbsinthePermission.Middleware.md): Absinthe middleware that enforces `AbsinthePermission` rules.

- DSL Helpers
  - [AbsinthePermission.DSL](AbsinthePermission.DSL.md): Macros that compose the AbsinthePermission DSL.

- Data Structures
  - [AbsinthePermission.Condition](AbsinthePermission.Condition.md): Compiled condition AST and helpers.
  - [AbsinthePermission.Decision](AbsinthePermission.Decision.md): The result of evaluating all rules attached to a field.
  - [AbsinthePermission.Rule](AbsinthePermission.Rule.md): A single authorization or filtering rule attached to a schema field.

- Internals
  - [AbsinthePermission.Compiler](AbsinthePermission.Compiler.md): Compile-time machinery for `AbsinthePermission`.
  - [AbsinthePermission.Evaluator](AbsinthePermission.Evaluator.md): Pure (no side effects beyond the user-supplied loader functions)
evaluation of compiled rules against a request.

- Exceptions
  - [AbsinthePermission.CompileError](AbsinthePermission.CompileError.md): Raised at schema compile time when the DSL is misused — unknown
permission, unknown loader, malformed condition expression, etc.
  - [AbsinthePermission.MissingContextError](AbsinthePermission.MissingContextError.md): Raised at request time when the Absinthe context lacks the keys
`AbsinthePermission` requires (`:current_user`, `:permissions`).
  - [AbsinthePermission.UnauthorizedError](AbsinthePermission.UnauthorizedError.md): Raised (or returned as a tagged error) when a caller is not authorised to
perform an operation.

## Mix Tasks

- [mix absinthe_permission.audit](Mix.Tasks.AbsinthePermission.Audit.md): Print every `AbsinthePermission` rule attached to a schema, grouped
by `(type, field)`.

