absinthe-graphql/absinthe_plug
66.2
Adequate · 18 September 2026
2.1k
lines of production code
Elixir
primary language
1
measurement over time
What this system is
Absinthe.Plug is an Elixir library that integrates the Absinthe GraphQL toolkit with the Plug interface, enabling GraphQL endpoints in Phoenix applications. It handles request parsing, schema execution, and response serialization, while supporting features like file uploads, batched queries, and persisted documents. The system also provides a configurable GraphiQL interface for development and enforces strict HTTP method restrictions for mutations and subscriptions.
How it got here
2015 — Initial release and modernization
5 changes.
This period marks the initial public release of Absinthe.Plug v1.5.10, introducing Plug support for GraphQL with security fixes and SSE compatibility. The work involved modernizing the project by migrating to Elixir 1.10+ configuration syntax, upgrading core dependencies like Absinthe and Jason, and removing legacy modules and placeholder tests to prepare for Hex publishing.
2016 — Phoenix integration and GraphiQL support
5 changes.
This period focused on integrating Absinthe with Phoenix applications through the new Absinthe.Plug module, enabling seamless endpoint mounting and request handling. It also introduced the GraphiQL interface with configurable options and added file upload support via multipart form data. Additionally, stricter validation rules were implemented to enforce HTTP method restrictions for mutations and block subscriptions over standard HTTP.
2017 — Batching and GraphiQL enhancements
8 changes.
This period focused on enhancing the Absinthe Plug with support for batched GraphQL queries and persisted queries via compiled document providers. It also introduced significant updates to the GraphiQL interface, including new UI views for Playground and Workspace, alongside corresponding Mix tasks for asset management.
Features
Initial release of Absinthe.Plug v1.5.10 with security and stability fixes
This entry marks the initial public release of the Absinthe.Plug package, providing Plug support for the Absinthe GraphQL toolkit in Elixir. The release includes a fix for an XSS vulnerability in the GraphiQL \js\_escape\ function and improves error handling for schema module validation failures. It also introduces several features such as token limits for init and raw options, compatibility with the GraphQL SSE standard for Server-Sent Events, and the ability to pass a default query to the GraphiQL interface. The package is licensed under MIT and requires Elixir 1.10 or higher.
(repo-wide) · high confidence
Introduction of Absinthe.Plug for Phoenix integration
This change introduces the \Absinthe.Plug\ module, providing a Plug-based interface for integrating Absinthe GraphQL with Phoenix applications. It enables developers to mount GraphQL endpoints via \Plug.Parsers\ or \Phoenix.Router.forward\, supporting features such as custom JSON codecs, complexity analysis, token limits, and GraphiQL interface serving. The plug handles request parsing, schema execution, and response serialization, offering configuration options for context, logging, and before-send hooks to customize behavior.
lib/absinthe · high confidence
New GraphiQL interface options and file upload support
The \lib/absinthe/plug\ directory now includes \Absinthe.Plug.GraphiQL\, which allows users to select between three UI interfaces (\:advanced\, \:simple\, or \:playground\) and configure default headers, URLs, and socket URLs for subscriptions. Additionally, \Absinthe.Plug.Types\ introduces an \:upload\ scalar type, enabling GraphQL mutations to accept file uploads via multipart form data, while \Absinthe.Plug.Parser\ handles the necessary request parsing for \application/graphql\ content types.
lib/absinthe/plug · high confidence
New Mix tasks to manage GraphiQL assets
Added three new Mix tasks (\absinthe.plug.graphiql.assets.download\, \.remove\, and the internal \.assets\) to allow users to download and remove GraphiQL static assets locally. The download task ensures the \:ssl\ application is started before fetching remote files, and the remove task cleans up the local asset directory.
lib/mix · high confidence
New batch query runner for Absinthe
A new \Absinthe.Plug.Batch.Runner\ module has been added to handle batched GraphQL queries. This component processes multiple queries concurrently by building and running validation and result pipelines, leveraging Absinthe's built-in batch resolution capabilities to optimize performance for requests containing multiple operations.
lib/absinthe/plug/batch · high confidence
Support for persisted queries via compiled document providers
This change introduces a new \Absinthe.Plug.DocumentProvider.Compiled\ module that allows applications to register pre-compiled GraphQL documents by key, enabling persisted query support. Users can now define documents at compile time using the \provide/2\ and \provide/1\ macros, which are validated during compilation to catch errors early. The system includes a default provider for standard query parsing and a compiled provider that looks up documents by a configurable request parameter (defaulting to \"id"\). This architecture allows developers to optimize performance by skipping runtime parsing for known queries while maintaining the flexibility to disable the default provider if desired.
_lib/absinthe/plug/document\provider · high confidence
Removals
Removal of legacy AbsinthePlug module
The \lib/absinthe\_plug.ex\ file has been deleted, removing the \AbsinthePlug\ module that previously handled GraphQL request processing via the Plug interface. This change eliminates the custom implementation that parsed JSON, form-urlencoded, and application/graphql content types, managed schema verification, and executed queries, indicating a shift away from this specific integration point within the library.
lib · high confidence
Behavioural changes
Enforce HTTP method restrictions for mutations and block subscriptions over HTTP
The library now includes validation phases that enforce stricter HTTP method usage: mutations are restricted to POST requests only, and subscriptions are explicitly forbidden over HTTP (requiring WebSocket connections instead). This ensures that clients attempting to perform mutations via GET or other non-POST methods, or trying to run subscriptions over standard HTTP, receive clear error messages guiding them to use the correct protocol.
lib/absinthe/validation · high confidence
Migration to Elixir 1.10+ config syntax and adjusted logger verbosity
The configuration file has been updated to use the modern \import Config\ syntax instead of the deprecated \use Mix.Config\, aligning with current Elixir standards. Additionally, the default logger level has been changed from \:info\ to \:warning\, meaning informational log messages will no longer be displayed by default, and the environment-specific configuration import has been disabled.
config · high confidence
New GraphiQL asset management and UI templates for Playground and Workspace views
The \lib/absinthe/plug/graphiql\ location now includes a new \Assets\ module and three HTML templates (\graphiql.html.eex\, \graphiql\_playground.html.eex\, \graphiql\_workspace.html.eex\) that define how the GraphiQL interface is served. The \Assets\ module manages dependencies for GraphiQL (3.8.3), GraphiQL Workspace (1.1.5), GraphQL Playground (1.2.0), and socket integration (0.1.1), supporting both local and remote asset sources. The templates render the respective UIs, with the Workspace and standard GraphiQL views integrating \@absinthe/socket-graphiql\ for subscription support, while the Playground view uses its own endpoint and subscription endpoint configuration.
lib/absinthe/plug/graphiql · high confidence
New request query struct and parsing logic in Absinthe Plug
A new \Absinthe.Plug.Request.Query\ struct and associated parsing functions have been introduced to handle GraphQL request data. This change adds explicit handling for extracting the raw document, operation name, and variables from request parameters, including support for decoding variables via a JSON codec. It also integrates document providers into the request processing pipeline and adds configurable logging for query runs, forming the core data structure for how incoming GraphQL requests are parsed and prepared for execution within the Absinthe Plug.
lib/absinthe/plug/request · high confidence
Test coverage
Added test fixtures for GraphQL query extraction; Added test support utilities for Absinthe.Plug; Added tests for Absinthe.Plug and GraphiQL configuration options; Added tests for compiled document provider and telemetry events; Added tests for document provider configuration and transport batching; Removed placeholder test file.
Dependencies
Upgrade to Absinthe 1.7 and modernize project configuration
This release upgrades the core Absinthe dependency from a git-based development version to Hex package 1.7.3, requiring Elixir 1.13 or later. The project also updates the Plug dependency to \~\> 1.4, replaces the Poison JSON library with Jason, and adds Dialyxir for static analysis. Additionally, the module name has been corrected from AbsinthePlug to Absinthe.Plug, and the package metadata (license, links, documentation) has been standardized for Hex publishing.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 66.
Lenses
- Code Health 100
- Architecture 99
- Maturity 58
- Readiness 80
- Security 96
- Accessibility 57
Changes since last survey
- 300 commits — 250 feature/other, 50 fixes
By area
- (repo) — 100 commits
- lib/absinthe — 93 commits
- (root) — 80 commits
- test/lib — 13 commits
- .github/workflows — 8 commits
- test/support — 3 commits
- config/config.exs — 2 commits
- lib/mix — 1 commit
Notable commits
- fix: Demonstrate the bug
- fix: Fix DocumentProvider.Compiled bug when called w/out :params (#116)
- fix: Fix DocumentProvider.pipeline/1 typespec
- fix: Fix Elixir 1.11 compiler warnings
- fix: Fix and unify typespecs
- fix: Fix compilation warning
- fix: Fix finding WebSocket path from Phoenix Socket
- fix: Fix further CI warnings
- fix: Fix schema valid check
- fix: Fix syntax errors in Plug documentation
- fix: Fix update_config
- fix: Fix warning in Elixir 1.17
- fix: Fix: variable "resp_body" is unused
- fix: Fixes #105
- fix: Merge pull request #119 from absinthe-graphql/chunk-bug-fix
- fix: Merge pull request #126 from avitex/fix-graphiql-templates
- fix: Merge pull request #134 from absinthe-graphql/revert-isDeepEqual-bug
- fix: Merge pull request #143 from fredr/fix/graphiql_socket_url
- fix: Merge pull request #153 from absinthe-graphql/provider-context-bug
- fix: Merge pull request #155 from rafaelgaspar/fix-for-phoenix-1-4
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
absinthe-graphql/absinthe_plug was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit a20146ead4bdd885f3c22115fbe37b86b4330217 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.