absinthe v1.4.0-beta.1 Absinthe.Plugin behaviour View Source
Plugin Behaviour
Plugins are an additional set of callbacks that can be used by module based middleware to run actions before and after resolution, as well as add additional phases to run after resolution
Link to this section Summary
Functions
Returns the list of default plugins
Callbacks
callback to do something with the resolution accumulator after resolution
callback to setup the resolution accumulator prior to resolution
callback used to specify additional phases to run
Link to this section Types
Link to this section Functions
Returns the list of default plugins.
Link to this section Callbacks
after_resolution(resolution_acc :: Document.Resolution.acc) :: Document.Resolution.acc
callback to do something with the resolution accumulator after resolution.
NOTE: This function is given the full accumulator. Namespacing is suggested to avoid conflicts.
before_resolution(resolution_acc :: Document.Resolution.acc) :: Document.Resolution.acc
callback to setup the resolution accumulator prior to resolution.
NOTE: This function is given the full accumulator. Namespacing is suggested to avoid conflicts.
pipeline(next_pipeline :: Absinthe.Pipeline.t, resolution_acc :: map) :: Absinthe.Pipeline.t
callback used to specify additional phases to run.
Plugins may require additional resolution phases to be run. This function should use values set in the resolution accumulator to determine whether or not additional phases are required.
NOTE: This function is given the whole pipeline to be inserted after the current phase completes.