feat(api): GraphQL query batching & rate-limit recovery with exponential backoff#6675
Conversation
…-limit resilience
|
@S0412-2007 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @JhaSourav07 👋 This PR adds two resilience utilities for the GraphQL rate-limit recovery feature outlined in #6656:
All 1009 existing tests pass ✅. Let me know if you'd like any changes! |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod007
left a comment
There was a problem hiding this comment.
Hey! This looks like a really powerful feature with the query batching and exponential backoff, which is exactly what we need for rate-limit recovery.
I'm assigning level:advanced because handling exponential backoff and GraphQL query batching involves quite a bit of complex asynchronous logic, and I'll add ype:feature and ype:performance.
However, I'm requesting changes because it looks like a github_content.txt file was accidentally committed to the root directory with TypeScript code inside it. Could you please remove that file and ensure the code is in its proper location? Once that's cleaned up, I'd be happy to approve!
c5cd006 to
c8027d0
Compare
|
Hi @Aamod007 , thank you for the review and the level:advanced label! 🙏 I've removed the accidentally committed |
|
Hi @Aamod007 , just following up — I've addressed your feedback by removing the stray github_content.txt file and merged in the latest changes from main to keep the branch current. All required checks (CI Pipeline, CodeQL, etc.) are passing; the only failing check is Vercel, which just needs deployment authorization. Thanks again for the review! |
Aamod007
left a comment
There was a problem hiding this comment.
Hey! Thanks for pushing updates to address the feedback. Unfortunately, it looks like this PR is currently blocked (due to failing CI checks, merge conflicts, etc.). We can't approve or proceed with the review until the build is green. Please resolve these issues, and let me know if you need any help debugging!
Aamod007
left a comment
There was a problem hiding this comment.
Hey! Thanks for adding this feature. It looks well-implemented and integrates nicely with the existing UI components. Assigning level:intermediate and quality:clean. Approved!
|
🎉 Congratulations @S0412-2007! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
…xponential backoff (JhaSourav07#6675) ## Description Closes JhaSourav07#6656 Adds a stale SVG watermark fallback and request deduplication utilities to improve rate-limit resilience across the GraphQL API layer. ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🔧 Other (Bug fix, refactoring, docs) ## Visual Preview `lib/svg/staleWatermark.ts` injects a subtle amber ⚠ cached badge into the SVG when GitHub's rate limit is exhausted, so users see a degraded-but-not-broken badge instead of a broken image. ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally (`localhost:3000/api/streak?user=YOUR_USERNAME`). - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] My commits follow the Conventional Commits format (e.g., `feat(themes): ...`, `fix(calculate): ...`). - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started the repo. - [x] I have made sure that i have only one commit to merge in this PR. - [x] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts). - [x] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
Description
Closes #6656
Adds a stale SVG watermark fallback and request deduplication utilities to improve rate-limit resilience across the GraphQL API layer.
Pillar
Visual Preview
lib/svg/staleWatermark.tsinjects a subtle amber ⚠ cached badge into the SVG when GitHub's rate limit is exhausted, so users see a degraded-but-not-broken badge instead of a broken image.Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.