Closed CharlesOkwuagwu closed 6 years ago
I'm trying to make my helpers more restrictive than not. as a starting point. This point is one I think is interesting but counterpoints that I have thought of.
a) this will catch if anyone mistakenly sets query twice
b) There is ambiguity on how you might merge queries
d) the user can always fall back to %{request | query: query}
if they really need it.
a) this will catch if anyone mistakenly sets query twice
Then we make this explicit in the docs for that function, that clears the ambiguity
Are you able to add a comment in the docs that makes this clear to you?
i'll think of one
This line will only match requests where the query had not been set
def set_query(request = %Raxx.Request{query: nil}, query) do
What if we want to set / append / or change the existing query?