We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We could consider some kind of support for GraphQL and deeply nested page values or cursors.
A shorthand inline query syntax with template literal interpolation using last call's response:
fetchPaginate('https://graphql.example.com', { graphql: (previous) => ` query someQuery { products(page: ${previous?.data?.products?.nextPage || 1}) { id nextPage } } ` })
Or, using a static query but dynamically re-defining variables for each paged call:
const query = ` query someQuery($page: Int = 1, $type: String) { products(page: $page, type: $type) { id nextPage } } `; fetchPaginate('https://graphql.example.com', { graphql: { query, variables: (previous) => ({ type: 'blog', page: previous?.data?.products?.nextPage }) } })
The text was updated successfully, but these errors were encountered:
AndersDJohnson
No branches or pull requests
We could consider some kind of support for GraphQL and deeply nested page values or cursors.
A shorthand inline query syntax with template literal interpolation using last call's response:
Or, using a static query but dynamically re-defining variables for each paged call:
The text was updated successfully, but these errors were encountered: