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

V9 refactoring and cleanup #732

Merged
merged 23 commits into from Aug 20, 2021
Merged

V9 refactoring and cleanup #732

merged 23 commits into from Aug 20, 2021

Conversation

KATT
Copy link
Member

@KATT KATT commented Jul 28, 2021

Think this PR along with #718 settles what I want to do with the next major update.

Keen to have any input on other fundamentals people / API surfaces or shapes that people think should change (including if you disagree with the changes here) - ping @cyrus-za / @anthonyshort / @peterp / @mmkal .

Summary of changes

@vercel
Copy link

vercel bot commented Jul 28, 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/9ocnssrTJBNMfbpkMu2KUNoTuDs1
✅ Preview: https://www-git-feature-next-major.tmp.trpc.io

todomvc – ./examples/next-prisma-todomvc

🔍 Inspect: https://vercel.com/trpc/todomvc/4AtubuWG1U2EufXWfFgy9zpEqGcL
✅ Preview: https://todomvc-git-feature-next-major.tmp.trpc.io

@KATT KATT added ⏭ major bump needed Requires a major version bump 🚧 wip work in progress labels Jul 28, 2021
@KATT KATT added this to the v9 milestone Jul 29, 2021
KATT added 5 commits July 29, 2021 10:19
# Conflicts:
#	packages/server/test/index.test.tsx
#	packages/server/test/middleware.test.ts
#	www/docs/server/authorization.md
@@ -12,8 +12,7 @@ const JSONRPC2_TO_HTTP_CODE: Record<
> = {
PARSE_ERROR: 400,
BAD_REQUEST: 400,
METHOD_NOT_FOUND: 405,
PATH_NOT_FOUND: 404,
NOT_FOUND: 404,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no 405 METHOD_NOT_ALLOWED?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's removed now anyway :)

@@ -270,7 +270,7 @@ describe('integration tests', () => {
trpc.router<Context>().query('whoami', {
async resolve({ ctx }) {
if (!ctx.user) {
throw trpc.httpError.unauthorized();
throw new TRPCError({ code: 'UNAUTHORIZED' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likimng this syntax 👍🏻

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
♻️ autoupdate ⏭ major bump needed Requires a major version bump 🙏 review please needs community sign-off
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Batching transformers inconsistency input/output Reduce TRPCError-codes
4 participants