Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Found via `codespell -S deps,cover -L symboll,boolen,whoknows,technics`
  • Loading branch information
kianmeng committed Nov 1, 2023
1 parent 7f6f8bb commit c92ddff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions lib/absinthe/schema/notation/sdl_render.ex
Original file line number Diff line number Diff line change
Expand Up @@ -351,30 +351,30 @@ defmodule Absinthe.Schema.Notation.SDL.Render do

# Render Helpers

defp render_list(items, type_definitions, seperator \\ line())
defp render_list(items, type_definitions, separator \\ line())

# Workaround for `values` macro which temporarily defines
# values as raw atoms to support dynamic schemas
defp render_list([first | _] = items, type_definitions, seperator) when is_atom(first) do
defp render_list([first | _] = items, type_definitions, separator) when is_atom(first) do
items
|> Enum.map(
&%Blueprint.Schema.EnumValueDefinition{
value: &1,
name: String.upcase(to_string(&1))
}
)
|> render_list(type_definitions, seperator)
|> render_list(type_definitions, separator)
end

defp render_list(items, type_definitions, seperator) do
defp render_list(items, type_definitions, separator) do
items = Enum.reject(items, &(&1.module in @skip_modules))

splitter =
items
|> Enum.any?(&(&1.description not in ["", nil]))
|> case do
true -> [nest(line(), :reset), line()]
false -> [seperator]
false -> [separator]
end

items
Expand Down
2 changes: 1 addition & 1 deletion lib/absinthe/subscription.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule Absinthe.Subscription do
@doc """
Build a child specification for subscriptions.
In order to use supscriptions in your application, you must add
In order to use subscriptions in your application, you must add
`Absinthe.Subscription` to your supervision tree after your endpoint.
See `guides/subscriptions.md` for more information on how to get up and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ defmodule Elixir.Absinthe.Integration.Execution.TokenLimitEnforcement do
"""

# token count 33 = 8 braces + 2 parens + 2 brackets + 2 string values + 1 null + 1 float + 1 bool +
# 3 colons + 1 ... + 1 on + 0 ignroed comment + 1@ + 1 directive + 9 names
# 3 colons + 1 ... + 1 on + 0 ignored comment + 1@ + 1 directive + 9 names

assert {:ok, %{errors: [%{message: "Token limit exceeded"}]}} ==
Absinthe.run(query, Absinthe.Fixtures.Things.MacroSchema, token_limit: 32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ defmodule Absinthe.Phase.Document.Arguments.CoerceListsTest do
end
end

describe "when using a List of a coercable type input argument" do
describe "when using a List of a coercible type input argument" do
test "coerces the type from a single element to List" do
doc = """
query List {
Expand Down
2 changes: 1 addition & 1 deletion test/absinthe/resolution/middleware_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ defmodule Absinthe.MiddlewareTest do
assert %{"public" => %{"email" => "secret", "name" => "bob"}} == data
end

test "secret object cant be accessed without a current user" do
test "secret object can't be accessed without a current user" do
doc = """
{returnsPrivateObject { key }}
"""
Expand Down

0 comments on commit c92ddff

Please sign in to comment.