Skip to content

Commit

Permalink
Ensure the pipeline modifier is loaded before we try the function_exp…
Browse files Browse the repository at this point in the history
…orted? call
  • Loading branch information
benwilson512 committed Jul 15, 2024
1 parent cb2b766 commit 353a366
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/absinthe/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ defmodule Absinthe.Schema do
def apply_modifiers(pipeline, schema, opts \\ []) do
Enum.reduce(schema.__absinthe_pipeline_modifiers__(), pipeline, fn
{module, function}, pipeline ->
Code.ensure_loaded!(module)

cond do
function_exported?(module, function, 1) ->
apply(module, function, [pipeline])
Expand All @@ -377,6 +379,8 @@ defmodule Absinthe.Schema do
end

module, pipeline ->
Code.ensure_loaded!(module)

cond do
function_exported?(module, :pipeline, 1) ->
module.pipeline(pipeline)
Expand Down

0 comments on commit 353a366

Please sign in to comment.