absinthe v1.4.2 API Reference

Modules

Documentation for the Absinthe package, a toolkit for building GraphQL APIs with Elixir

Absinthe supports an adapter mechanism that allows developers to define their schema using one code convention (eg, snake_cased fields and arguments), but accept query documents and return results (including names in errors) in another (eg, camelCase)

This defines an adapter that supports GraphQL query documents in their conventional (in JS) camelcase notation, while allowing the schema to be defined using conventional (in Elixir) underscore (snakecase) notation, and tranforming the names as needed for lookups, results, and error messages

The default adapter, which makes no changes to incoming query document ASTs or outgoing results

Represents the graphql document to be executed

Blueprint Execution Data

Extra metadata passed to aid complexity analysis functions, describing the current field’s environment

Introspection support

Handles logging of Absinthe-specific events

Middleware enables custom resolution behaviour on a field

This plugin enables asynchronous execution of a field

Batch the resolution of multiple fields

This is the default middleware

Middleware that just passes the parent down to the children

Behaviour for Absinthe Phases

Execute a pipeline of phases

A basic struct that wraps phase errors for reporting to the user

Plugin Behaviour

The primary struct of resolution

Handy functions for returning async or batched resolution functions

Define a GraphQL schema

This module contains macros used to build GraphQL types

Real time updates via GraphQL

Pubsub behaviour expected by Absinthe to power subscriptions

Used to define an argument

Built in data types

This module contains the following additional data types:

  • datetime (UTC)
  • naive_datetime
  • date
  • time
  • decimal (only if Decimal is available)

Used by the GraphQL runtime as a way of modifying execution behavior

Used to define an enum type, a special scalar that can only have a defined set of values

A possible value for an enum

Used to define a field

Defines a GraphQL input object

A defined interface type that represent a list of named fields and their arguments

A wrapping type which declares the type of each item in the list

A type that wraps an underlying type, acting identically to that type but adding a non-null constraint

Represents a non-leaf node in a GraphQL tree of information

Represents a primitive value

A unions is an abstract type made up of multiple possible concrete types

Exceptions

An error during analysis

An error during execution

Exception raised when a schema is invalid

Exception raised when a schema is invalid

Mix Tasks

Generate a schema.json file