Skip to content
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

Merged
merged 4 commits into from Jul 19, 2021
Merged

flatten post requests' input #671

merged 4 commits into from Jul 19, 2021

Conversation

KATT
Copy link
Member

@KATT KATT commented Jul 19, 2021

Before post bodies looked like

{
  input: <<INPUT_DATA>>
}

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

@vercel
Copy link

vercel bot commented Jul 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

www – ./www

🔍 Inspect: https://vercel.com/trpc/www/8EjbXkka6pkgQMpmqYSEQtAaUaD1
✅ Preview: https://www-git-feature-post-refac.tmp.trpc.io

todomvc – ./examples/next-prisma-todomvc

🔍 Inspect: https://vercel.com/trpc/todomvc/3TnhMBePHksPo7dyacTkAYnhsahi
✅ Preview: https://todomvc-git-feature-post-refac.tmp.trpc.io

@KATT KATT temporarily deployed to trpcws-pr-671 July 19, 2021 00:42 Inactive
@KATT KATT temporarily deployed to trpcws-pr-671 July 19, 2021 00:43 Inactive
@KATT KATT changed the title flatten post requests flatten post requests' input Jul 19, 2021
@KATT KATT marked this pull request as ready for review July 19, 2021 16:31
@KATT KATT requested a review from simonedelmann July 19, 2021 16:32
@KATT KATT temporarily deployed to trpcws-pr-671 July 19, 2021 16:32 Inactive
@KATT KATT merged commit c85f62e into main Jul 19, 2021
@KATT KATT deleted the feature/post-refac branch July 19, 2021 16:59
KATT added a commit that referenced this pull request Jul 19, 2021
@KATT KATT mentioned this pull request Aug 15, 2021
KATT added a commit that referenced this pull request Aug 20, 2021
- 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)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant