Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
benwilson512 committed Nov 23, 2023
1 parent 228fa2e commit fd61373
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/absinthe/middleware/async.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/absinthe/middleware/batch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/absinthe/resolution/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down

0 comments on commit fd61373

Please sign in to comment.