Skip to content

Releases: webrpc/gen-typescript

v0.21.0

22 Oct 17:00
af334d1

Choose a tag to compare

What's Changed

Features

Query Keys for React Query / SWR

The generated client now includes a queryKey property with type-safe query key generators for each endpoint. This makes it easy to use with popular data-fetching
libraries like tanstack query and Vercel's SWR

import { useQuery } from '@tanstack/react-query'
import { Example } from './client.gen'

const client = new Example('http://localhost:3000', fetch)

function UserProfile({ userId }) {
  const { data } = useQuery({
    queryKey: client.queryKey.getUser({ userId }),
    queryFn: ({ signal }) => client.getUser({ userId }, undefined, signal)
  })

  return <div>{data?.user.name}</div>
}

The query keys follow the pattern [ServiceName, methodName, request?]

Full Changelog: v0.20.2...v0.21.0

v0.19.0

29 Jul 14:44
8afe13b

Choose a tag to compare

What's Changed

Full Changelog: v0.18.0...v0.19.0

v0.18.0

29 Jul 14:41
bf0cc97

Choose a tag to compare

What's Changed

Full Changelog: v0.17.0...v0.18.0

v0.17.0

25 Mar 18:58
52d15f4

Choose a tag to compare

What's Changed

Full Changelog: v0.16.3...v0.17.0

v0.16.3

26 Feb 12:12
61a3d63

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.16.2...v0.16.3

v0.16.2

10 Dec 14:03
0e7d02f

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.16.0...v0.16.2

v0.16.1

28 Nov 16:17
7d92406

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.15.1...v0.16.1

v0.16.0

05 Nov 09:50
330b647

Choose a tag to compare

What's Changed

Full Changelog: v0.15.1...v0.16.0

v0.15.1

04 Nov 10:12
1c8a5e1

Choose a tag to compare

What's Changed

Full Changelog: v0.15.0...v0.15.1

v0.15.0

22 Oct 08:56
dffc0ff

Choose a tag to compare

What's Changed

Full Changelog: v0.14.1...v0.15.0