Skip to content

Commit

Permalink
feat: use union to batch queries
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 14, 2024
1 parent cc625ca commit b0fbee6
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 165 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-rivers-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@slonik/dataloaders": minor
---

use UNION to batch queries
187 changes: 37 additions & 150 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ describe('createConnectionLoaderClass', () => {
}),
]);

expect(countTaggedQueries('@count-query')).toEqual(2);
expect(countTaggedQueries('@edges-query')).toEqual(2);
expect(countTaggedQueries('@count-query')).toEqual(1);
expect(countTaggedQueries('@edges-query')).toEqual(1);

expect(getNodeIds(results[0].edges)).toEqual([
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
Expand Down

0 comments on commit b0fbee6

Please sign in to comment.