Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include params #14

Closed
bj-mcduck opened this issue Mar 27, 2017 · 4 comments
Closed

Include params #14

bj-mcduck opened this issue Mar 27, 2017 · 4 comments

Comments

@bj-mcduck
Copy link

Other than putting them into the URL, is there a way to add include params?

  findWookies: resourceAction('find-em?include=wookie,tart', {
    type: 'POST',
    pushToStore: true
  }),
@Exelord
Copy link
Member

Exelord commented Mar 28, 2017

Currently, the only possible way to do that is to use the example you passed or a payload (but only in case of GET)

It looks like a very interesting feature to add a support for queryParams. I will add it to my schedule.

@bj-mcduck
Copy link
Author

bj-mcduck commented Mar 28, 2017

Cool. Not sure if it helps, but I was expecting some kind of syntax like:

  findWookies: resourceAction('find-em', {
    type: 'POST',
    pushToStore: true,
    include: 'wookie,tart',
    filter: {name: 'chewie'},
    queryParams: {single: false}
  }),

//or
  findWookies: resourceAction('find-em', {
    type: 'POST',
    pushToStore: true,

    //May be simpler to have the options grouped in one key, so they could just be parsed into a string
    pathOptions: {
      include: 'wookie,tart',
      filter: {name: 'chewie'},
      queryParams: {single: false}
    }
  }),

@Exelord
Copy link
Member

Exelord commented Jun 20, 2017

OK, today it is on my way :)

Potential interface:

 findWookies: resourceAction('find-em', {
    type: 'POST',
    pushToStore: true,
    params: {
        single: false,
        include: 'wookie,tart',
        filter: {  name: 'chewie'  },
    }
  }),

Branch: feature-query-params
PR: is coming

@Exelord
Copy link
Member

Exelord commented Jun 24, 2017

Implemented :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants