absinthe v1.5.0-alpha.1 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
Underscores external input and leaves external input alone. Unlike the
Absinthe.Adapter.Passthrough
this does not break introspection (because
introspection relies on underscoring incoming introspection queries which we
still do)
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. It assumes the the object it receives is a map
and uses Map.get/2
to get the value for this field. If this field is already
marked as resolved, then this middleware does not touch it
Middleware that just passes the parent down to the children
Behaviour for Absinthe Phases
Pass on context and root value to document
Execute a pipeline of phases
A basic struct that wraps phase errors for reporting to the user
Plugin Behaviour
Information about the current resolution. It is created by adding field specific
information to the more general %Absinthe.Blueprint.Execution{}
struct
Handy functions for returning async or batched resolution functions
Real time updates via GraphQL
Pubsub behaviour expected by Absinthe to power subscriptions
Used to define an argument
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