Skip to content

Add abstraction to process GraphQL queries in batches (pagination)  #184

@butenkor

Description

@butenkor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions