🚨 Breaking Changes
RPCLink
- Removed the Event Iterator retry behavior. Use the new Client Retry Plugin instead
- Remove
eventIteratorMaxRetries
option - Remove
eventIteratorRetryDelay
option - Remove
eventIteratorShouldRetry
option
🚀 Features 🚀
Client Retry Plugin
const planets = await client.planet.list({ limit: 10 }, {
context: {
retry: 3, // Maximum retry attempts
retryDelay: 2000, // Delay between retries in ms
shouldRetry: options => true, // Determines whether to retry based on the error
onRetry: (options) => {}, // Hook executed on each retry
}
})
OpenAPI Spec Generation with Valibot and ArkType
import { OpenAPIGenerator } from '@orpc/openapi'
import { ZodToJsonSchemaConverter } from '@orpc/zod'
import {
experimental_ValibotToJsonSchemaConverter as ValibotToJsonSchemaConverter
} from '@orpc/valibot'
import {
experimental_ArkTypeToJsonSchemaConverter as ArkTypeToJsonSchemaConverter
} from '@orpc/arktype'
const openAPIGenerator = new OpenAPIGenerator({
schemaConverters: [
new ZodToJsonSchemaConverter(), // <-- if you use Zod
new ValibotToJsonSchemaConverter(), // <-- if you use Valibot
new ArkTypeToJsonSchemaConverter(), // <-- if you use ArkType
],
})
No significant changes