New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flatten post requests' input
#671
Conversation
This pull request is being automatically deployed with Vercel (learn more). www – ./www🔍 Inspect: https://vercel.com/trpc/www/8EjbXkka6pkgQMpmqYSEQtAaUaD1 todomvc – ./examples/next-prisma-todomvc🔍 Inspect: https://vercel.com/trpc/todomvc/3TnhMBePHksPo7dyacTkAYnhsahi |
- Reduce `TRPCError`s - `METHOD_NOT_FOUND` removed & `PATH_NOT_FOUND` renamed to `NOT_FOUND` (closes #733) - Align input and output serialization (closes #746) - Remove deprecated `httpErrors`-helper - Remove support for `?input` to be an array - now assuming a `Record<number, unknown>`-style dict (changed with backward compat in #669) - Remove support for `POST` calls being `{ input: x }` (originally from #671)
Before post bodies looked like
Now, we just pass input data straight off without nesting it in
input
. Added backward-compatible code and test that can be deleted in next major.The idea originated with having a body envelope was to be able to pass info about batching and the paths called, etc, but this is done through the query params