From 353a3661d2d9fdb6450596bbace5de90570ecda9 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Mon, 15 Jul 2024 15:13:26 -0400 Subject: [PATCH] Ensure the pipeline modifier is loaded before we try the function_exported? call --- lib/absinthe/schema.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/absinthe/schema.ex b/lib/absinthe/schema.ex index 6c15e17ede..4137e1da37 100644 --- a/lib/absinthe/schema.ex +++ b/lib/absinthe/schema.ex @@ -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]) @@ -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)