Skip to content

Conversation

@david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Nov 7, 2025

A big but mechanical refactor I've been putting off forever. The point is to delete the helpers deleted in app/api/hooks.ts. I have another smaller change following this that will simplify the types in the remaining helpers, which have been my nemesis for 5 years.

The broader idea is to rely on the QueryOptions API from React Query, which we can generate for our API calls in type-safe ways, producing a uniform object that can be passed equally well to any of the built-in RQ functions like useQuery and queryClient.prefetchQuery, which means we can share the query options between the loader prefetch and the fetch inside the component.

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
console Ready Ready Preview Nov 7, 2025 11:20pm

@david-crespo david-crespo merged commit 601cdfa into main Nov 12, 2025
7 checks passed
@david-crespo david-crespo deleted the api-hook-cleanup branch November 12, 2025 20:06
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