-
Notifications
You must be signed in to change notification settings - Fork 279
feat(api): implement graphql merge query pattern to reduce api call volume #2478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Current state of this PR is functional, but needs some further polish / refactoring, and update tests before being ready |
d09207b to
02866a2
Compare
- Add query merging infrastructure to batch multiple GraphQL queries into one - Create BatchMergedDetailsQueryFragment for combined notification queries - Update handlers (Discussion, Issue, PullRequest) with mergeQueryConfig - Add INDEX suffix variable naming for merged query support - Create getNotificationAuthor helper to handle snake_case/camelCase formats - Guard against null URLs in notification enrichment - Update test mocks to use nodeINDEX response format Co-authored-by: Adam Setch <adam.setch@outlook.com>
- Remove commented-out debug code from notifications.ts - Fix FIXME by using isAnsweredDiscussionFeatureSupported with account - Remove unused extras field from GraphQLMergedQueryConfig type - Add mergeQueryConfig tests for issue, pullRequest, discussion, and default handlers - Document why integration test is skipped (complex mocking requirements)
c85feb4 to
27e5321
Compare
|
@afonsojramos - this isn't ready yet, it's still very much a draft |
|
Just wanted another pair of eyes! I'll keep working on this tomorrow 🙈 |
Not ready yet, I have changed I'd like to make to it still...
What happened to my previous work on this branch, it seems you've rewrote the history and made other changes without discussion... I have local changes that I now need to untangle... |
Signed-off-by: Adam Setch <adam.setch@outlook.com>
…clash in merged query Signed-off-by: Adam Setch <adam.setch@outlook.com>
|


Implement GraphQL query aliasing and merging to reduce network calls and better utilize GitHub API rate limits
v6.14.1release buildFor Issues, Pull Requests or Discussions, full enrichment now occurs in a single API query with a maximum query cost of 4 units