Skip to content

Conversation

@snewcomer
Copy link
Contributor

@snewcomer snewcomer commented Oct 30, 2021

ref emberjs/ember.js#19791

Bug

Nested query params are not serialized into the URL property

/?filter=%5Bobject%20Object%5D

Expected

/?filter=[user][name][$contains]=nick

There are some other considerations - generating nested query strings can be done many different ways and exploring a solution requires that we settle on "one" of the ways to ensure we don't go breaking users.

e.g. a nested filter

?filter[make]=honda&filter[model]=civic
?filter=[make]=honda&filter=[model]=civic
?filter.make=honda&filter.model=civic

e.g. nested array filter
?a[0]=b&a[1]=c
?a[]=b&a[]=c
?a=b&a=c

Note - libraries like qs have taken stances on certain patterns. We can glean what to do from them but in no means is it the "correct" way.

@snewcomer snewcomer force-pushed the nested-qps branch 2 times, most recently from a02846d to 877fc19 Compare January 9, 2022 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant