Skip to content

Commit

Permalink
Fix credo violations
Browse files Browse the repository at this point in the history
  • Loading branch information
bradschwartz committed Sep 25, 2024
1 parent fb19c84 commit 0d2115f
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions lib/graphql_markdown/multi_page.ex
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,22 @@ defmodule GraphqlMarkdown.MultiPage do
end

defp reference_for_kind(field) do
case Schema.field_kind(field["type"]) do
"OBJECT" ->
"objects.html#" <> Schema.field_type(field["type"])
reference =
case Schema.field_kind(field["type"]) do
"OBJECT" ->
"objects.html#" <> Schema.field_type(field["type"])

"INPUT_OBJECT" ->
"inputs.html#" <> Schema.field_type(field["type"])
"INPUT_OBJECT" ->
"inputs.html#" <> Schema.field_type(field["type"])

"ENUM" ->
"enums.html#" <> Schema.field_type(field["type"])
"ENUM" ->
"enums.html#" <> Schema.field_type(field["type"])

_ ->
"scalars.html#" <> Schema.field_type(field["type"])
end
|> String.downcase()
_ ->
"scalars.html#" <> Schema.field_type(field["type"])
end

String.downcase(reference)
end

defp render(type, text) do
Expand Down

0 comments on commit 0d2115f

Please sign in to comment.