For search GraphQL queries, implement an iterator (or a generator) to return paged results.
API should be like:
cluedin.gql.entries(context, query, variables)
Inside the entries method, send a GraphQL request, and if there's a cursor and entries in the response, yield the entries and request the same GraphQL but with the cursor this time.
For search GraphQL queries, implement an iterator (or a generator) to return paged results.
API should be like:
Inside the
entries
method, send a GraphQL request, and if there's acursor
andentries
in the response,yield
the entries and request the same GraphQL but with thecursor
this time.