Skip to content

Type-safe TanStack Query integration for Elysia Eden. Like @trpc/react-query, but for Elysia

License

Notifications You must be signed in to change notification settings

xkelxmc/eden-tanstack-query

Repository files navigation

eden-tanstack-query

npm version npm downloads codecov Tests

GitHub last commit GitHub stars License: Apache 2.0 TypeScript

Type-safe TanStack Query integration for Elysia Eden. Like @trpc/react-query, but for Elysia.

Packages

Package Version Size
eden-tanstack-react-query 0.1.0 Size: 11.15 KB (gzipped: 2.66 KB)

Quick Start

bun add eden-tanstack-react-query @tanstack/react-query @elysiajs/eden
import { 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

Examples

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

Development

# Install dependencies
bun install

# Run tests
bun test

# Build
bun run build

# Type check
bun run test:types

License

Apache-2.0

Copyright 2025-2026 Ilya Zhidkov

About

Type-safe TanStack Query integration for Elysia Eden. Like @trpc/react-query, but for Elysia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •