Skip to content

refactor: split GraphQL package search and count into separate queries#31

Merged
thelonewolf1603 merged 1 commit intomainfrom
nd/split-gql-queries
Mar 20, 2026
Merged

refactor: split GraphQL package search and count into separate queries#31
thelonewolf1603 merged 1 commit intomainfrom
nd/split-gql-queries

Conversation

@thelonewolf1603
Copy link
Copy Markdown
Contributor

Replace the combined package_search_with_count.gql (which fetched both results and aggregate count in one request) with two focused queries:

  • package_search.gql: fetches package results only (FilteredPackages)
  • package_search_count.gql: fetches aggregate count only (FilteredPackagesCounts)

Add buildGraphQLPackageVariables helper to avoid duplicating variable construction between fetchGraphQLPackages and fetchGraphQLPackageCount.

Replace the combined package_search_with_count.gql (which fetched both
results and aggregate count in one request) with two focused queries:
- package_search.gql: fetches package results only (FilteredPackages)
- package_search_count.gql: fetches aggregate count only (FilteredPackagesCounts)

Add buildGraphQLPackageVariables helper to avoid duplicating variable
construction between fetchGraphQLPackages and fetchGraphQLPackageCount.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thelonewolf1603 thelonewolf1603 merged commit 83b175c into main Mar 20, 2026
1 check passed
@thelonewolf1603 thelonewolf1603 deleted the nd/split-gql-queries branch March 20, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants