Created
November 16, 2016 20:27
-
-
Save sjchmiela/cbf2ba06c755ce52e8c42e9e2a360e99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Sheetly.Schema.Phase do | |
@custom_phases [ | |
Sheetly.Schema.Phase.Authorization, | |
] | |
def pipeline(config, opts) do | |
@custom_phases | |
|> Enum.reduce(Absinthe.Plug.default_pipeline(config, opts), &pipe_through_phase/2) | |
end | |
defp pipe_through_phase(phase, pipeline), do: phase.pipeline(pipeline) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forward "/", Absinthe.Plug, schema: Sheetly.Schema, pipeline: {Sheetly.Schema.Phase, :pipeline} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment