Handling paginated APIs with Mutiny #25107
Replies: 6 comments
-
|
Took a couple of days to find this, but exactly what I needed for https://ucdpapi.pcr.uu.se/api/gedevents/22.1?pagesize=1000 |
Beta Was this translation helpful? Give feedback.
-
|
How would you convert this to concurrently pull a configurable amount of pages? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the write-up! This helped me a lot for retrieving results from a GraphQL API that uses cursor-based pagination. Tmarven's stackoverflow answer helped me retrieving the cursor from the response. |
Beta Was this translation helpful? Give feedback.
-
|
Here is an example how to handle different pagination #36681 |
Beta Was this translation helpful? Give feedback.
-
|
The hosted Punk API will shut down May 1st, 2024. You could run it locally, though. |
Beta Was this translation helpful? Give feedback.
-
|
Well, the example is handy, but if you actually dig deeper you see it has a performance penalty. To retrieve all pages this implementation always does 1 extra call as it only knows when to stop when the size of beers are finished. This could be fine in some scenarios, but in others where you know the page size you can optimise it as you can already stop when returned Would be great to see an example which works properly knowing the page size in advance and doign the optimal number of calls. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Handling paginated APIs with Mutiny
Quarkus: Supersonic Subatomic Java
https://quarkus.io/blog/mutiny-pagination/
Beta Was this translation helpful? Give feedback.
All reactions