question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add pagination feature for querys

See original GitHub issue

right now for APIs that need a mandatory limit field, there is no easy out of the box way to allow for pagination, filling up the store query by query.

the reponse from the query have to be stored outside of the KIT QL store and concatenated with each subsequent queries response.

from a conversation with the author of this library it seems like he is already working on this feature.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
jycouetcommented, Jun 14, 2022

Once https://github.com/jycouet/kitql/discussions/156 is fully operational it will be possible.


We have to document things. My notes for now:

Pagination Types

Type 1 (I don’t know what name to give?)

Item form 0 to 9 button > next Item form 10 to 19

Type 2 (Infinite Scroll / append)

Item form 0 to 9 button > next Item form 0 to 19

Pagination Values

  • Should be easy to use
  • Should not overfetch
  • Should work with
    • offset, limit on a List
    • first, last on connection / edge
1reaction
jycouetcommented, Jun 27, 2022

So you will be able to loadNextPage until 1000.

first: 100 => loadNextPage => 100 first: 100 => loadNextPage => 200 first: 100 => loadNextPage => 300 first: 100 => loadNextPage => 400 first: 100 => loadNextPage => 500 first: 100 => loadNextPage => 600 first: 100 => loadNextPage => 700 first: 100 => loadNextPage => 800 first: 100 => loadNextPage => 900 first: 100 => loadNextPage => 1000

Read more comments on GitHub >

github_iconTop Results From Across the Web

Query features with pagination | Sample Code | ArcGIS
This sample demonstrates how to query features from a FeatureLayer that are beyond its maxRecordCount using pagination. This can be done by fetching...
Read more >
How to build a Pagination Component with React-Query (in 4 ...
Now we will add Pagination to the component by changing just 4 lines of code. Step 1. Pass “activePage” state to our useUsers...
Read more >
Pagination in SQL Server
Pagination is a process that is used to divide a large data into smaller discrete pages, and this process is also known as...
Read more >
React Query Tutorial - 19 - Paginated Queries - YouTube
Select " Add promo code" on checkout, enter the code, then hit "Apply". This will apply a 100% OFF lifetime discount to your...
Read more >
React Query Tutorial #5 - Pagination - YouTube
Hey gang, in this React Query tutorial we'll see how to better implement pagination using the usePaginatedQuery hook.React Query docs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found