Skip to content

Migrate bounty mutation hooks to GraphQL #103

@0xdevcollins

Description

@0xdevcollins

Depends on: #100
Migrate all bounty write operations from REST to GraphQL mutations.

Files to modify

  • hooks/use-bounty-mutations.ts

Tasks

  • useCreateBounty → use useCreateBountyMutation from generated hooks
  • useUpdateBounty → use useUpdateBountyMutation (note: backend expects id inside input, not as a separate arg)
  • useDeleteBounty → use useDeleteBountyMutation
  • useClaimBountythis mutation doesn't exist on the backend yet; either:
    • Remove this hook until the backend implements claimBounty, or
    • Use updateBounty with status: 'IN_PROGRESS' as a workaround
  • Preserve optimistic update logic (the existing onMutate/onError/onSettled pattern)
  • Update query key invalidation to use the new generated query key constants

Acceptance Criteria

  • Create, update, and delete bounties all work via GraphQL mutations
  • Optimistic updates still function correctly
  • Cache invalidation still triggers list refreshes

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions