commercetools / commercetools/sphere-node-sdk
Query params (non-predicate) via object notation
Open
Type: Enhancement
- Dominant language
- CoffeeScript
- Stars
- 16
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
This is a feature request - please let me know if this is the wrong place to do this.
It would be great if the client was able to take query parameters from an object and serialize them as query params rather than the documented `byQueryString` method.
Something like this:
```js
client.products.withQuery({ offset: 50, limit: 50, sort: "product.createdAt asc" }).fetch()
```
which would build:
```js
/products?offset=50&limit=50&sort=product.createdAt%20asc
```
That way the client can validate the query params, enforce encoding rules and make the DSL simpler.
Contributor guide
Assessment
This issue has not been assessed yet.