Skip to content

feat: Migrate useBounty detail hook to GraphQL#116

Merged
0xdevcollins merged 1 commit intoboundlessfi:mainfrom
legend4tech:Migrate-useBounty-detail-hook-to-GraphQL
Feb 25, 2026
Merged

feat: Migrate useBounty detail hook to GraphQL#116
0xdevcollins merged 1 commit intoboundlessfi:mainfrom
legend4tech:Migrate-useBounty-detail-hook-to-GraphQL

Conversation

@legend4tech
Copy link
Contributor

@legend4tech legend4tech commented Feb 24, 2026

Description

Migrates the single bounty detail fetching logic from REST to GraphQL by replacing bountiesApi.getById(id) with the generated useBountyQuery hook in both use-bounty.ts and use-bounty-detail.ts. Both hooks now return data typed as BountyFieldsFragment, giving access to all bounty relations including organization, project, bountyWindow, and submissions. Use-bounty-detail.ts has also been renamed to use-bounty-detail.ts to follow project conventions.

Changes

  • hooks/use-bounty.ts — replaced REST call with useBountyQuery, added optional enabled flag for external query control
  • hooks/use-bounty-detail.ts — replaced REST call with useBountyQuery, renamed file to match convention

Closes #102

Summary by CodeRabbit

  • Documentation
    • Improved internal documentation and comments for better code maintainability.

@vercel
Copy link

vercel bot commented Feb 24, 2026

@legend4tech is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f1fcb62 and 22f5d1b.

📒 Files selected for processing (2)
  • hooks/use-bounty-detail.ts
  • hooks/use-bounty.ts

📝 Walkthrough

Walkthrough

This PR adds descriptive documentation comments to two bounty query hooks (useBountyDetail and useBounty), clarifying their purpose, return types, included relations, and query behavior. No functional changes are made to either hook.

Changes

Cohort / File(s) Summary
Documentation Comments
hooks/use-bounty-detail.ts, hooks/use-bounty.ts
Added clarifying JSDoc-style comments to both hooks describing purpose, return type, included relations, and query execution behavior. No logic modifications.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 A hook needs a note,
A comment to gloat,
What returns and what flows,
Now every rabbit knows! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds only documentation comments without implementing the required GraphQL migration. The REST calls are not replaced and the file is not renamed. Implement the actual GraphQL migration by replacing REST API calls with useBountyQuery, update component mapping for the new Bounty type, and rename the file to use-bounty-detail.ts.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change in the PR - migrating the useBounty detail hook from REST to GraphQL.
Out of Scope Changes check ✅ Passed The changes are in scope but incomplete. Adding documentation comments is aligned with the migration effort but does not fulfill the core requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@legend4tech
Copy link
Contributor Author

@algora-pbc attempt

Hi! I'd like to work on this.

My approach: I'll analyze the requirements and implement a robust solution following the project's standards. I have experience with the relevant technologies and will ensure the code is well-tested and documented.

Estimated time: 2-5 days

Why me:

  • Strong technical background
  • Experience with open source contributions
  • Focus on quality and timely delivery

I'll have a PR ready soon!

Are U okay?

@0xdevcollins 0xdevcollins merged commit 7a8e634 into boundlessfi:main Feb 25, 2026
2 of 3 checks passed
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.

Migrate useBounty (detail) hook to GraphQL

2 participants