Skip to content

flatten post requests' input - #671

Merged
KATT merged 4 commits into
mainfrom
feature/post-refac
Jul 19, 2021
Merged

KATT merged 4 commits into
mainfrom
feature/post-refac

Conversation

@KATT

@KATT KATT commented Jul 19, 2021 •

Copy link
Copy Markdown
Member

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

vercel Bot commented Jul 19, 2021 •

Copy link
Copy Markdown

@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

This branch was successfully deployed

2 active and 1 inactive deployments
trpcws-pr-671 — 50ec3771 Deployed Jul 19, 2021 by KATT
Preview – www — 50ec3771 Deployed Jul 19, 2021 by vercel[bot]
Preview – todomvc — 50ec3771 Deployed Jul 19, 2021 by vercel[bot]
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.

1 participant