Open-source project
absinthe-graphql/absinthe avatar
absinthe-graphql/absinthe

Absinthe: the GraphQL toolkit for Elixir

The GraphQL toolkit for Elixir

4,400 stars561 forksElixirNOASSERTION

At a glance

What is it?
Absinthe is a GraphQL implementation for Elixir with compile-time schema macros, a configurable query pipeline and batched field resolution. It fits Elixir services that want a typed schema and control over validation, not teams looking for a drop-in REST replacement.
Who is it for?
Adopt Absinthe if your service is already Elixir and you want schema structure checked at compile time plus explicit control over validation and resolution. Do not adopt it if you need a language-agnostic gateway, or if you are not prepared to own the schema, the resolvers and the query limits yourself.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 27 days ago.
What is it written in?
Mainly Elixir, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Absinthe is for, and who ends up using it

Absinthe is a GraphQL implementation for Elixir. The README states the goals plainly: a complete implementation of the GraphQL Working Draft, an idiomatic API for Elixir developers, extensibility built from small parts, detailed error messages, and a focus on production-level performance. That is a library, not a server. It gives you the schema language, the validation pipeline and the resolution machinery; Phoenix or Plug provide the HTTP layer.

The audience follows from that. You are writing an Elixir application, you already have data access code in Elixir, and you want to expose it as a GraphQL endpoint rather than a set of REST routes. The README also names frontend support as a concern, with specialized support for Relay and stated compatibility with other GraphQL clients. If your clients are Relay or Apollo-style consumers that expect camelCase fields, Absinthe's translation layer is the part that matters to them.

Compile-time schemas and a pipeline you can replace

The mechanism that separates Absinthe from a thin spec implementation is where the schema is checked. The README says schemas are defined using macros that build and verify their structure at compile time, which the project presents as preventing runtime errors and increasing performance. A malformed field definition surfaces when you compile, not when a client sends the first query.

The second mechanism is the pipeline. Absinthe describes the entire query processing pipeline as configurable: the parser, individual validations, and resolution logic can be added, swapped out or removed, even on a per-document basis. That is a real architectural commitment. Precompiled documents and complexity limiting are both described in the README as safety features, and both depend on being able to intervene at specific stages rather than accepting one fixed execution path.

Resolution is the third piece. Absinthe lists asynchronous field resolution, batched field resolution described as addressing N+1 query problems, and a resolution plugin system. Batched resolution is the one most teams feel first, because it changes how you write data loaders rather than how you write the schema.

Installing Absinthe and defining a first schema

The README gives the dependency as a Hex package. Add it to your mix.exs deps. Note the stated requirement: Absinthe requires Elixir 1.10 or higher.

elixir
def deps do
  [{:absinthe, "~> 1.7.0"}]
end

Absinthe also ships Mix tasks for extracting schema metadata. The README does not list them individually; it says to run mix help in your project and look for tasks starting with absinthe.

bash
mix help

That command prints the available tasks, including the ones starting with absinthe. From there, the tutorial, guides and general information about Absinthe-related projects live at absinthe-graphql.org rather than in the README, so the schema definition syntax itself is documented there and in the hexdocs, not in the repository front page.

Where Absinthe is the wrong tool

Absinthe is an Elixir library. If your services are not in Elixir, nothing here helps you, and there is no separate runtime to adopt: the schema, the resolvers and the deployment all live inside your Elixir application. Teams that want a standalone GraphQL gateway in front of services written in several languages are looking at a different category of software.

The safety features also cut both ways. Complexity analysis with configurable limiting and support for precompiled documents exist because an open GraphQL endpoint lets clients construct queries you did not anticipate. The README presents these as capabilities, but they are only useful if you configure them. A default Absinthe endpoint with no complexity limit and custom documents allowed is exposed in exactly the way those features were built to prevent.

Finally, the repository metadata reports the licence as NOASSERTION, while the README badge links to the MIT licence text. That mismatch is worth resolving internally before you ship, and it is not something this article can settle.

Absinthe against a schema-first GraphQL server

The closest comparison in approach is a schema-first GraphQL server that reads a .graphql SDL file at startup and binds resolvers to it by name. In that model the schema is a text artifact, usually shared with frontend teams, and the server validates it when it boots.

Absinthe inverts that. The schema is Elixir code built from macros and verified at compile time, which means the schema is not a portable file you can hand to a client team as-is. The trade is that you get the full Elixir toolchain around it: compile-time errors, the formatter, and the ability to generate or transform schema structure programmatically. The README's own framing supports this reading, describing the API as idiomatic and readable for Elixir developers rather than describing an SDL-first workflow. If your organization treats the schema as a language-neutral contract shared across teams, that difference is the deciding factor, and it is a difference in philosophy rather than in feature coverage.

Maintenance, upgrades and licence

The repository is not archived, and the most recent push recorded is 2026-09-02, the same day as the v1.12.0 release. The release cadence visible in the metadata shows v1.10.0 in April 2026, v1.11.0 in June 2026 and v1.12.0 in September 2026, so roughly quarterly.

Upgrade cost is documented in one place: the README says to see CHANGELOG.md for upgrade steps between versions. There is no separate migration guide mentioned, and the README does not document rollback. The practical implication is that you should read the changelog entry for each version you cross rather than jumping several releases at once, because the only upgrade instructions the project points to are inside that file.

On licensing, the README badge references the MIT licence and links to the opensource.org MIT page, while the repository's own metadata records the licence as NOASSERTION and the README defers to LICENSE.md. Both point at the same file, so read LICENSE.md directly. This is a description of what the repository states, not legal advice.

Editorial conclusion

Adopt Absinthe if your service is already Elixir and you want schema structure checked at compile time plus explicit control over validation and resolution. Do not adopt it if you need a language-agnostic gateway, or if you are not prepared to own the schema, the resolvers and the query limits yourself. Before committing, verify the Elixir version constraint in mix.exs against your toolchain, read CHANGELOG.md for the upgrade steps between your current version and v1.12.0, and confirm the LICENSE.md terms with your own counsel, since the repository metadata reports NOASSERTION rather than a resolved SPDX identifier.

Frequently asked questions

What is Absinthe in Elixir?

It is a GraphQL implementation for Elixir. The README describes it as aiming for a complete implementation of the GraphQL Working Draft with an idiomatic API, compile-time schema verification and a configurable query processing pipeline.

How do I install Absinthe?

Add {:absinthe, "~> 1.7.0"} to your deps in mix.exs and fetch it from Hex.pm. The README notes that Absinthe requires Elixir 1.10 or higher.

Does Absinthe handle the N+1 query problem?

The README lists batched field resolution among its advanced resolution features and describes it as addressing N+1 query problems. Asynchronous field resolution and a resolution plugin system are listed alongside it.

What Mix tasks does Absinthe provide?

The README states that Absinthe includes Mix tasks for extracting schema metadata, and directs you to run mix help in your project and look for tasks starting with absinthe. It does not list them individually.

How do I upgrade Absinthe between versions?

The README points to CHANGELOG.md for upgrade steps between versions. It does not document a separate migration path or a rollback procedure.

Official sources

  1. absinthe-graphql/absinthe on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/absinthe-graphql-absinthe.svg)](https://hysenlabs.com/projects/absinthe-graphql-absinthe)
Community notes

Community notes