absinthe v1.3.2 Absinthe.Pipeline
Execute a pipeline of phases.
A pipeline is merely a list of phases. This module contains functions for building, modifying, and executing pipelines of phases.
Summary
Functions
Return the part of a pipeline before a specific phase
Return the part of a pipeline after (and including) a specific phase
Replace a phase in a pipeline with another, supporting reusing the same options
Return the part of a pipeline up to and including a specific phase
Types
Functions
Return the part of a pipeline after (and including) a specific phase.
insert_before(t, Absinthe.Phase.t, Absinthe.Phase.t) :: t
Replace a phase in a pipeline with another, supporting reusing the same options.
Examples
Replace a simple phase (without options):
iex> Pipeline.replace([A, B, C], B, X)
[A, X, C]
Replace a phase with options, retaining them:
iex> Pipeline.replace([A, {B, [name: "Thing]}, C], B, X)
[A, {X, [name: "Thing"]}, C]
Replace a phase with options, overriding them:
iex> Pipeline.replace([A, {B, [name: "Thing]}, C], B, {X, [name: "Nope"]})
[A, {X, [name: "Nope"]}, C]
run(data_t, t) :: {:ok, data_t, [Absinthe.Phase.t]} | {:error, String.t, [Absinthe.Phase.t]}
run_phase(t, data_t, [Absinthe.Phase.t]) :: {:ok, data_t, [Absinthe.Phase.t]} | {:error, String.t, [Absinthe.Phase.t]}
Return the part of a pipeline up to and including a specific phase.