From 40f6cc87f5bc83a63ef979c0f485b050b0b6e696 Mon Sep 17 00:00:00 2001 From: Michael Caterisano Date: Tue, 11 Jun 2024 10:01:46 -0400 Subject: [PATCH] format --- .../phase/document/execution/resolution.ex | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/absinthe/phase/document/execution/resolution.ex b/lib/absinthe/phase/document/execution/resolution.ex index 6caf5c97..416b9852 100644 --- a/lib/absinthe/phase/document/execution/resolution.ex +++ b/lib/absinthe/phase/document/execution/resolution.ex @@ -231,15 +231,19 @@ defmodule Absinthe.Phase.Document.Execution.Resolution do defp reduce_resolution(%{middleware: []} = res), do: res defp reduce_resolution(%{middleware: [middleware | remaining_middleware]} = res) do - :telemetry.span [:absinthe, :middleware, :call], %{middleware: middleware, resolution: res}, fn -> - result = - case call_middleware(middleware, %{res | middleware: remaining_middleware}) do - %{state: :suspended} = res -> res - res -> reduce_resolution(res) - end - - {result, %{middleware: middleware, resolution: res}} - end + :telemetry.span( + [:absinthe, :middleware, :call], + %{middleware: middleware, resolution: res}, + fn -> + result = + case call_middleware(middleware, %{res | middleware: remaining_middleware}) do + %{state: :suspended} = res -> res + res -> reduce_resolution(res) + end + + {result, %{middleware: middleware, resolution: res}} + end + ) end defp call_middleware({{mod, fun}, opts}, res) do