This module contains the pagination algorithms (both regular and iterative) that make use of pagination strategies.

exception subgrounds.pagination.pagination.PaginationError(message, strategy)#
subgrounds.pagination.pagination.paginate(schema, doc, pagination_strategy)#

Evaluates a PaginationStrategy against a document based upon a schema.

Produces a stream of :class:`Document`s until pagination is completed. Documents are

executed outside the this function and data is transfered via the generator scheme.

  • schema (SchemaMeta) -- The GraphQL schema on which the request document is based

  • doc (Document) -- The request document


The response data as a JSON dictionary

Return type:

dict[str, Any]