-
Notifications
You must be signed in to change notification settings - Fork 1
Fix TS builds, Lambda Runtime, Add Array input support, and fix tests #2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
I did have to remove the nuxt example due to some peer dependency issues (I think the @next branch of @trpc/client isn't up to date with the fact that |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
@@ -24,15 +24,15 @@ | |||
"examples/with-express", | |||
"examples/with-interop", | |||
"examples/with-serverless", | |||
"examples/with-fastify", | |||
"examples/with-nuxtjs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is removal of with-nuxtjs intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with-fastify
wasn't, but nuxt
was. See the comment up above
Unfortunately, there are some peer dependency issues that prevented me from getting that one going. Rather than have npm install
problems, I opted to just take it out here for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Thank you!
path: queryPath, | ||
procedure, | ||
}); | ||
if(procedure._def.type === "mutation" || procedure._def.type === "query" ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to exclude subscriptions from the cache. Is it your intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some comments about the intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think WebSockets or Server-sent Events (SSE) are being properly handled by openapi-trpc
? Happy to revert this if you don't think its a valid change.
import type { RootConfig } from '@trpc/server/dist/core/internals/config'; | ||
import { TRPC_ERROR_CODE_KEY } from '@trpc/server/rpc'; | ||
import type { RouterDef } from '@trpc/server/src/core/router'; | ||
import type { APIGatewayProxyEvent, APIGatewayProxyEventV2 } from 'aws-lambda'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an import of aws-lambda
should be moved to non-shared file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a type
import so nothing runtime is affected - its only used during TypeScript builds of the project and is a devDependency
. Can you justify the additional complexity of simply not listing it here?
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
return an unknown error even if not TRPCError
Hi - I ran into some issues when attempting to use this with
@trpc/server
v11, and after digging in was impressed anything was working at all given the number of TypeScript issues!I'm not 100% sure that I have everything exactly right, but tests are passing now and its working for my use case.