🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
MIT License
originalError
to cause
to align with https://github.com/tc39/proposal-error-cause (#881)@internal
/@public
/@alpha
/@beta
-tags to indicate users should use and not (#890)12.x
(#886)next()
: method in server-side middlewares - see docs
responseMeta()
: Better support for custom HTTP headers & status code - see caching docs
@trpc/next
are now serializednpx npm-check-updates --filter /@trpc/ -u && yarn
.middleware()
and add return next()
at the end. See middleware docs
next()
function that you have to call.TRPCError
s - METHOD_NOT_FOUND
removed & PATH_NOT_FOUND
renamed to NOT_FOUND
(#733)httpErrors
-helper?input
to be an array - now assuming a Record<number, unknown>
-style dict (changed with backward compat in #669)POST
calls being { input: x }
(originally from #671)ErrorFormatter
- data
has to be a Record<string, unknown>
httpStatus
as part of error object as the default error shapehttpStatus
will be used to determine the actual HTTP Status code setTRPCClientError.data
as a shortcut to error.shape.data
as that's the only one I find myself usingTRPCError
we infer in @trpc/react
is now TRPCErrorLike
and is serialized for SSR in @trpc/next
responseMeta()
that is triggered before a request ends - both as part of @trpc/next
& @trpc/server
@trpc/server
receives type
, paths
, errors
, and the unserialized data[]
that is going out@trpc/next
it client errorsThanks to @mmkal, @peterp, @anthonyshort, & @simonedelmann for your feedback!
Published by KATT about 3 years ago
splitLink
: left
/right
now aliased as true
/false
(#689)createContext
-fn (#687)add workaround for a superjson issue when serializing an object that originates from Object.create(null)
- #680
undefined
to batch inputs without them being type-casted as null
- #669POST
HTTP requests, skip wrapping in input
property - #671Both of the above changes shape of HTTP-requests, but backwards-compatability and tests are added, in case someone uses tRPC as a public API.
Thanks to @simonedelmann for the idea on #669!
transformers
to router (#545)useLiveQuery
- #568transformer
as part of http handler (previously deprecated) #545 / #571withTRPC()
refactor - now only accepts 1 argument - #572