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

Add pagination on nested queries #26

Closed
Tracked by #34
karatakis opened this issue Jul 29, 2022 · 4 comments
Closed
Tracked by #34

Add pagination on nested queries #26

karatakis opened this issue Jul 29, 2022 · 4 comments

Comments

@karatakis
Copy link
Collaborator

Allow API to generate pagination for nested queries

query QueryZoo {
  zoo {
    data {
      name
      year
      animals(pagination: {limit: 4, page: 2}) {
        name
      }
    }
    pages
    current
  }
}
@karatakis karatakis mentioned this issue Aug 8, 2022
17 tasks
@billy1624
Copy link
Member

billy1624 commented Aug 9, 2022

I guess we need to query the result inside the data loader with UNION?

SELECT ... FROM animals WHERE id = ? LIMIT ?
UNION
SELECT ... FROM animals WHERE id = ? LIMIT ?
UNION
SELECT ... FROM animals WHERE id = ? LIMIT ?

@penso
Copy link

penso commented Aug 9, 2022

It would be very nice to have a way not to miss anything during pagination if you have new objects inserted in the meantime, using edges and nodes. Is that planned?

@penso
Copy link

penso commented Aug 9, 2022

Nevermind, saw #19

@karatakis
Copy link
Collaborator Author

This have been implemented, also its included in the new API #114

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

No branches or pull requests

3 participants