diff --git a/lib/absinthe/middleware/async.ex b/lib/absinthe/middleware/async.ex index c121af0481..52bdaccdb1 100644 --- a/lib/absinthe/middleware/async.ex +++ b/lib/absinthe/middleware/async.ex @@ -113,10 +113,10 @@ defmodule Absinthe.Middleware.Async do # Optionally use `async/1` function from `opentelemetry_process_propagator` if available if Code.ensure_loaded?(OpentelemetryProcessPropagator.Task) do - @spec async((() -> any)) :: Task.t() + @spec async((-> any)) :: Task.t() defdelegate async(fun), to: OpentelemetryProcessPropagator.Task else - @spec async((() -> any)) :: Task.t() + @spec async((-> any)) :: Task.t() defdelegate async(fun), to: Task end end diff --git a/lib/absinthe/middleware/batch.ex b/lib/absinthe/middleware/batch.ex index 4ab60719b1..1030fbb098 100644 --- a/lib/absinthe/middleware/batch.ex +++ b/lib/absinthe/middleware/batch.ex @@ -209,10 +209,10 @@ defmodule Absinthe.Middleware.Batch do # Optionally use `async/1` function from `opentelemetry_process_propagator` if available if Code.ensure_loaded?(OpentelemetryProcessPropagator.Task) do - @spec async((() -> any)) :: Task.t() + @spec async((-> any)) :: Task.t() defdelegate async(fun), to: OpentelemetryProcessPropagator.Task else - @spec async((() -> any)) :: Task.t() + @spec async((-> any)) :: Task.t() defdelegate async(fun), to: Task end end diff --git a/lib/absinthe/resolution/helpers.ex b/lib/absinthe/resolution/helpers.ex index 1746b27c94..70f1e21738 100644 --- a/lib/absinthe/resolution/helpers.ex +++ b/lib/absinthe/resolution/helpers.ex @@ -34,8 +34,8 @@ defmodule Absinthe.Resolution.Helpers do end ``` """ - @spec async((() -> term)) :: {:middleware, Middleware.Async, term} - @spec async((() -> term), opts :: [{:timeout, pos_integer}]) :: + @spec async((-> term)) :: {:middleware, Middleware.Async, term} + @spec async((-> term), opts :: [{:timeout, pos_integer}]) :: {:middleware, Middleware.Async, term} def async(fun, opts \\ []) do {:middleware, Middleware.Async, {fun, opts}} diff --git a/test/absinthe/integration/execution/operation_by_name_test.exs b/test/absinthe/integration/execution/operation_by_name_test.exs index a67a17df38..fcdc6a8860 100644 --- a/test/absinthe/integration/execution/operation_by_name_test.exs +++ b/test/absinthe/integration/execution/operation_by_name_test.exs @@ -55,7 +55,9 @@ defmodule Elixir.Absinthe.Integration.Execution.OperationByNameTest do test "scenario #4" do assert {:ok, %{data: %{"thing" => %{"name" => "Bar"}}}} == - Absinthe.run(@query, Absinthe.Fixtures.Things.MacroSchema, operation_name: "ThingBar") + Absinthe.run(@query, Absinthe.Fixtures.Things.MacroSchema, + operation_name: "ThingBar" + ) end @query """