Type-safe TanStack Query integration for Elysia Eden. Like @trpc/react-query, but for Elysia.
| Package | Version | Size |
|---|---|---|
| eden-tanstack-react-query | 0.1.0 | Size: 11.15 KB (gzipped: 2.66 KB) |
bun add eden-tanstack-react-query @tanstack/react-query @elysiajs/edenimport { createEdenTanStackQuery } from 'eden-tanstack-react-query'
import { useQuery, useMutation } from '@tanstack/react-query'
import type { App } from './server'
const { EdenProvider, useEden } = createEdenTanStackQuery<App>()
function UserList() {
const eden = useEden()
// Fully typed queries
const { data: users } = useQuery(eden.users.get.queryOptions())
// Fully typed mutations
const createUser = useMutation(eden.users.post.mutationOptions())
return (/* ... */)
}Documentation · Package README · CHANGELOG
| Example | Description |
|---|---|
| basic | Simple CRUD with users |
| medium | Blog with posts, comments, users |
| large | Full app with organizations, members, posts, comments, categories, tags |
# Run an example
cd examples/basic
bun install
bun run dev# Install dependencies
bun install
# Run tests
bun test
# Build
bun run build
# Type check
bun run test:typesCopyright 2025-2026 Ilya Zhidkov