Skip to content

Pagination goes into infinite loop when querying empty lists #71

@Skogsfrae

Description

@Skogsfrae

When requesting a paginated resource with no values the paginator goes into an infinite loop of requests to the spotify api.

To reproduce the bug I made this query on a user with no public playlists

{
   user(id: "someid"){
    playlists{
      name
    }
  }
}

The api returns an empty list with total=0, but the !!iterator.total condition inside the shouldStopIterate function causes and infinite loop of requests.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions