Pagination and calling REST APIs #4161
-
We have a GraphQL server that is calling several REST endpoints to aggregate some data for the client. The server calls the first REST API to get an initial list of items and then makes a couple of other REST calls in parallel to get more details. We would like to use pagination with GraphQL and to be able to pass the paging request through to that first REST endpoint. Is there anything in GraphQL or Hot Chocolate to facilitate this? Adding as Q&A, but maybe this could be a feature idea if it's not available yet. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I'm not sure if I understand your use-case correctly, but you can customize the pagination resolver, i.e. access the paging arguments and forward them to your REST service. This is covered by the documentation: https://chillicream.com/docs/hotchocolate/fetching-data/pagination/#customization |
Beta Was this translation helpful? Give feedback.
I'm not sure if I understand your use-case correctly, but you can customize the pagination resolver, i.e. access the paging arguments and forward them to your REST service. This is covered by the documentation: https://chillicream.com/docs/hotchocolate/fetching-data/pagination/#customization