Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Add support for filter/skip/limit/etc arguments of children fields #31

Open
eliedrian opened this issue Feb 19, 2018 · 3 comments
Open

Comments

@eliedrian
Copy link

Title says it all.

http://graphql.org/learn/schema/#arguments tells me it's possible 😃

@nirinchev
Copy link
Member

By children fields, do you mean collection properties (to many relationship)? So you can have something like:

query {
  companies {
    companyId
    name
    address
    employees(query: "isActive = true", skip: 10, take: 10)
  }
}

@eliedrian
Copy link
Author

Exactly! And ofcourse

query {
  companies(query: "isActive = false") { # that is, inactive companies
    companyId
    name
    address
    employees(query: "isActive = true", skip: 10, take: 10) # but active employees
  }
}

should work as well

@nirinchev
Copy link
Member

Sounds like a nice addition. I'll add it to our backlog, but in the meantime, we'd be happy to review a PR if you'd like to take a stab at it 🤓

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

No branches or pull requests

3 participants