From b77a879945ed3183cbce9afffe6bfdb4bbe7a39c Mon Sep 17 00:00:00 2001 From: Michael Caterisano Date: Sat, 4 Nov 2023 21:19:35 -0400 Subject: [PATCH] remove camelize call that breaks stuff --- lib/absinthe/schema/notation.ex | 1 - test/absinthe/schema/sdl_render_test.exs | 6 ------ test/absinthe/schema/type_system_directive_test.exs | 8 ++++++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/absinthe/schema/notation.ex b/lib/absinthe/schema/notation.ex index 538d6381f4..0bd8fe1ec9 100644 --- a/lib/absinthe/schema/notation.ex +++ b/lib/absinthe/schema/notation.ex @@ -1991,7 +1991,6 @@ defmodule Absinthe.Schema.Notation do defp default_name(Schema.DirectiveDefinition, identifier) do identifier |> Atom.to_string() - |> Absinthe.Utils.camelize(lower: true) end defp default_name(_, identifier) do diff --git a/test/absinthe/schema/sdl_render_test.exs b/test/absinthe/schema/sdl_render_test.exs index 4a61f410cc..7adc2f5ba2 100644 --- a/test/absinthe/schema/sdl_render_test.exs +++ b/test/absinthe/schema/sdl_render_test.exs @@ -208,10 +208,6 @@ defmodule Absinthe.Schema.SdlRenderTest do on :field end - directive :foo_foo do - on :field - end - enum :order_status do value :delivered value :processing @@ -248,8 +244,6 @@ defmodule Absinthe.Schema.SdlRenderTest do query: RootQueryType } - directive @fooFoo on FIELD - directive @foo(baz: String) on FIELD \"Escaped\\t\\\"descrição\\/description\\\"\" diff --git a/test/absinthe/schema/type_system_directive_test.exs b/test/absinthe/schema/type_system_directive_test.exs index 6034d7bbff..2310a16533 100644 --- a/test/absinthe/schema/type_system_directive_test.exs +++ b/test/absinthe/schema/type_system_directive_test.exs @@ -33,6 +33,10 @@ defmodule Absinthe.Schema.TypeSystemDirectiveTest do :input_field_definition ] end + + directive :camel_case_me do + on [:field_definition] + end end defmodule TypeSystemDirectivesSdlSchema do @@ -110,7 +114,7 @@ defmodule Absinthe.Schema.TypeSystemDirectiveTest do directive :feature, name: ":field_definition" end - field :sweet, :sweet_scalar + field :sweet, :sweet_scalar, directives: [:camel_case_me] field :which, :category field :pet, :dog @@ -190,7 +194,7 @@ defmodule Absinthe.Schema.TypeSystemDirectiveTest do type RootQueryType { post: Post @feature(name: \":field_definition\") - sweet: SweetScalar + sweet: SweetScalar @camelCaseMe which: Category pet: Dog search(filter: SearchFilter @feature(name: \":argument_definition\")): SearchResult @feature(name: \":argument_definition\")