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
This function doesn't actually have any documentation so it's not entirely clear how it's different from path/1. In attempting to add the documentation, it's unclear how to describe what it does.
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. https://github.com/absinthe-graphql/absinthe/blob/3d0823bd71c2ebb94357a5588c723e053de8c66a/lib/absinthe/resolution.ex#L238-L246