-
Notifications
You must be signed in to change notification settings - Fork 527
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
Absinthe.Resolution.path_string/1 crashes if path includes a list #1337
Comments
mdg
added a commit
to pathpub/absinthe
that referenced
this issue
Sep 1, 2024
This function doesn't actually have any documentation so it's not entirely clear how it's different from |
mdg
added a commit
to pathpub/absinthe
that referenced
this issue
Sep 1, 2024
and add documentation for path_string/1 this fix is absinthe-graphql#1337 absinthe-graphql#1337
mdg
added a commit
to pathpub/absinthe
that referenced
this issue
Sep 1, 2024
in Absinthe.Resolution; also: * add documentation for path_string/1 * add specs for path/1 and path_string/1 this fix is absinthe-graphql#1337 absinthe-graphql#1337
mdg
added a commit
to pathpub/absinthe
that referenced
this issue
Sep 3, 2024
fix the type on Resolution.path/1 incorporating PR feedback from @benwilson512 issue absinthe-graphql#1337
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a patch for this one ready. Just submitting the issue for referencing from the PR.
Environment
Expected behavior
Expected Absinthe.Resolution.path_string/1 to always return a list of strings and not raise a FunctionClauseError
Actual behavior
If the query path contains a list, the path value list contains an integer for the node in the path that is a list item. The fn passed to the map matches on maps and a FunctionClauseError is raised when it gets to the integer. case statement fails with a FunctionClause
Relevant Schema/Middleware Code
Schema has to include a list upstream from the field being resolved when path_string is called.
absinthe/lib/absinthe/resolution.ex
Lines 238 to 246 in 3d0823b
The text was updated successfully, but these errors were encountered: