Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non_null(list_of()) and :id #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kirega
Copy link
Contributor

@kirega kirega commented Apr 22, 2024

Adds support for the request in #6

  • Adds support for the id type.
  • Adds support for the curious case of non_null(list_of()) raising the following error
Invalid constraints for field/arg `id` of type `%Absinthe.Blueprint.TypeReference.NonNull{of_type: %Absinthe.Blueprint.TypeReference.List{of_type: :string, errors: []}, errors: []}`: [:format]


    (absinthe_constraints 0.2.0) lib/absinthe_constraints/directive.ex:72: AbsintheConstraints.Directive.handle_invalid_args/2
    (absinthe_constraints 0.2.0) lib/absinthe_constraints/directive.ex:61: AbsintheConstraints.Directive.do_expand/3
    (elixir 1.16.1) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:16: anonymous fn/3 in Absinthe.Blueprint.Transform.prewalk/2
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:117: Absinthe.Blueprint.Transform.walk/4
    (elixir 1.16.1) lib/enum.ex:1826: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:147: anonymous fn/4 in Absinthe.Blueprint.Transform.walk_children/5
    (elixir 1.16.1) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:122: Absinthe.Blueprint.Transform.walk/4
    (elixir 1.16.1) lib/enum.ex:1826: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (elixir 1.16.1) lib/enum.ex:1826: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:147: anonymous fn/4 in Absinthe.Blueprint.Transform.walk_children/5
    (elixir 1.16.1) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:122: Absinthe.Blueprint.Transform.walk/4
    (elixir 1.16.1) lib/enum.ex:1826: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (elixir 1.16.1) lib/enum.ex:1826: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:147: anonymous fn/4 in Absinthe.Blueprint.Transform.walk_children/5
    (elixir 1.16.1) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
    (absinthe 1.7.6) lib/absinthe/blueprint/transform.ex:122: Absinthe.Blueprint.Transform.walk/4
    (elixir 1.16.1) lib/enum.ex:1826: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3

Looking forward to your reviews and more tests scenarios to consider.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant