diff --git a/lib/absinthe/schema/notation/sdl_render.ex b/lib/absinthe/schema/notation/sdl_render.ex index e434fd5c98..db47be1029 100644 --- a/lib/absinthe/schema/notation/sdl_render.ex +++ b/lib/absinthe/schema/notation/sdl_render.ex @@ -88,9 +88,10 @@ defmodule Absinthe.Schema.Notation.SDL.Render do ) end + @adapter Absinthe.Adapter.LanguageConventions defp render(%Blueprint.Schema.InputValueDefinition{} = input_value, type_definitions) do concat([ - string(input_value.name), + string(@adapter.to_external_name(input_value.name, :argument)), ": ", render(input_value.type, type_definitions), default(input_value.default_value_blueprint) @@ -98,7 +99,6 @@ defmodule Absinthe.Schema.Notation.SDL.Render do |> description(input_value.description) end - @adapter Absinthe.Adapter.LanguageConventions defp render(%Blueprint.Schema.FieldDefinition{} = field, type_definitions) do concat([ string(@adapter.to_external_name(field.name, :field)), diff --git a/test/absinthe/schema/sdl_render_test.exs b/test/absinthe/schema/sdl_render_test.exs index fdc10c57a8..9dd631dbba 100644 --- a/test/absinthe/schema/sdl_render_test.exs +++ b/test/absinthe/schema/sdl_render_test.exs @@ -179,6 +179,7 @@ defmodule SdlRenderTest do query do field :echo, :string do arg :times, :integer, default_value: 10, description: "The number of times" + arg :time_interval, :integer end end @@ -205,6 +206,8 @@ defmodule SdlRenderTest do type RootQueryType { echo( + timeInterval: Int + "The number of times" times: Int ): String