absinthe v1.5.3 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(execution)
View Sourceafter_resolution(execution :: Absinthe.Blueprint.Execution.t()) :: Absinthe.Blueprint.Execution.t()
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(execution)
View Sourcebefore_resolution(execution :: Absinthe.Blueprint.Execution.t()) :: Absinthe.Blueprint.Execution.t()
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, execution)
View Sourcepipeline( next_pipeline :: Absinthe.Pipeline.t(), execution :: Absinthe.Blueprint.Execution.t() ) :: 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.