commercetools / commercetools/sphere-node-sdk

Add abstraction to process GraphQL queries in batches (pagination)

Open
#184 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
16
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Expected behavior
When i query GraphQL endpoint and results has to be processed in batches/pages it should provide paginated results to the caller by calling callback function on each page (including page data as callback argument).
Example: ```client.graphql.process(myFn, myLimit, myQuery)```
### Actual behavior
process is not implemented: https://github.com/sphereio/sphere-node-sdk/blob/6e5c429736e364d3e82b1b256bf2aa57c1000dcb/src/coffee/services/graphql.coffee#L74

Nice to have for logging purposes: provide to callback function optional stats with: total results, currently processed/fetched amount, progress percentage value.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.