# Query-params-new-new-new-new

**URL:** https://discuss.emberjs.com/t/query-params-new-new-new-new/4312
**Category:** Uncategorized
**Created:** [February 28, 2014, 7:32pm UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312 "2014-02-28T19:32:04Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![machty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/machty/32/13933_2.png) [@machty](https://discuss.emberjs.com/u/machty)
#### Post date: [February 28, 2014, 7:32pm UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/1 "2014-02-28T19:32:04Z")

</div>

I’d like to get some more eyes on [https://gist.github.com/machty/d687cab552ecee2f9162](https://gist.github.com/machty/d687cab552ecee2f9162) , which have some of my ideas on what needs to happen with query params to get it to beta-ready.

In particular, I need to hear any use cases that aren’t going to be well supported in that gist.

One specific thing: given my idea of using the defaultValue type to determine the deserialization strategy (for numbers at least, maybe arrays?), is there ever an instance, for number query params, that you’d prefer to have a unspecified or null default value? I can’t think of a use case for this… seems like you’d always want a default value to be like 0 or 1 or maybe some items\_per\_page value, but when would you actually want null?

---

<div class="post-metadata">

### Author: ![go1dfish](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/go1dfish/32/3588_2.png) [@go1dfish](https://discuss.emberjs.com/u/go1dfish)
#### Post date: [February 28, 2014, 9:25pm UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/2 "2014-02-28T21:25:38Z")

</div>

I like this for common cases, but it still doesn’t handle my weird use case where I’m essentially emulating an existing url structure, and proxying the full contents of the query string (without needing to know it’s underlying structure) to an underlying API.

This is needed for my [http://rednit.com](http://rednit.com) reddit client to be able to support any arbitrary reddit url.

---

<div class="post-metadata">

### Author: ![machty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/machty/32/13933_2.png) [@machty](https://discuss.emberjs.com/u/machty)
#### Post date: [February 28, 2014, 9:37pm UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/3 "2014-02-28T21:37:16Z")

</div>

I remember your use case; I can expose that in the API but that’s definitely not the hard part of what we’re trying to work out.

---

<div class="post-metadata">

### Author: ![go1dfish](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/go1dfish/32/3588_2.png) [@go1dfish](https://discuss.emberjs.com/u/go1dfish)
#### Post date: [February 28, 2014, 10:13pm UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/4 "2014-02-28T22:13:33Z")

</div>

True that.

I really like the general approach fleshed out here for everything else.

Moving the definitions into the router is a very good move IMO; but you still don’t lose the easy controller interface into the parameters.

---

<div class="post-metadata">

### Author: ![matthooks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/matthooks/32/14936_2.png) [@matthooks](https://discuss.emberjs.com/u/matthooks)
#### Post date: [February 28, 2014, 10:50pm UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/5 "2014-02-28T22:50:18Z")

</div>

I’ve got a setup like:

```coffeescript
App.Router.map ->
  @resource "parent", ->
    @route "one"
    @route "two"

```

The parent controller has query params general to all of the children and the children have query params specific to their needs.

Right now, I’m able to pretty easily bundle the parent and child query params in the child route to pass to an ajax request. How would I go about doing that in the new proposal?

---

<div class="post-metadata">

### Author: ![machty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/machty/32/13933_2.png) [@machty](https://discuss.emberjs.com/u/machty)
#### Post date: [March 1, 2014, 2:39am UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/6 "2014-03-01T02:39:21Z")

</div>

How are you bundling the parent and child params? `paramsFor`?

I don’t think your use case will be affected.

---

<div class="post-metadata">

### Author: ![machty](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/machty/32/13933_2.png) [@machty](https://discuss.emberjs.com/u/machty)
#### Post date: [March 1, 2014, 2:39am UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/7 "2014-03-01T02:39:57Z")

</div>

I tried this new (uncoded) api out on the examples in the guides, so far so good: [https://gist.github.com/machty/3a714c22569863d4b9cc](https://gist.github.com/machty/3a714c22569863d4b9cc)

---

<div class="post-metadata">

### Author: ![matthooks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/matthooks/32/14936_2.png) [@matthooks](https://discuss.emberjs.com/u/matthooks)
#### Post date: [March 1, 2014, 4:43am UTC](https://discuss.emberjs.com/t/query-params-new-new-new-new/4312/8 "2014-03-01T04:43:37Z")

</div>

> [@machty](#):
>
> paramsFor

Wow, didn’t realize this existed. I feel foolish.

`paramsFor` seems to return all strings – I imagine it’d be returning proper types with the new-new-new changes? In that case, my use case should be fine…
