Skip to content

Commit

Permalink
Yield edge at end (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
eskrm authored May 17, 2023
1 parent ecc49c7 commit 4cff339
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,12 @@ export class FarosClient {
});
const edges = traverse(data, edgesPath) || [];
for (const edge of edges) {
yield edge;
id = traverse(edge, edgeIdPath);
unset(edge, edgeIdPath);
if (!id) {
break;
return;
}
yield edge;
}
// break on partial page
hasNextPage = edges.length === pageSize;
Expand Down

0 comments on commit 4cff339

Please sign in to comment.