You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
typing issue with custom grpc callOptions on single operation #187
will build fine, but on runtime, gRPC calls will fail with:
Trace: Error: Incorrect arguments passed
at Proxy.checkOptionalUnaryResponseArguments (/xxxxxxx/api/node_modules/.pnpm/@grpc+grpc-js@1.12.5/node_modules/@grpc/grpc-js/src/client.ts:229:15)
at Proxy.makeUnaryRequest (/xxxxxxx/api/node_modules/.pnpm/@grpc+grpc-js@1.12.5/node_modules/@grpc/grpc-js/src/client.ts:277:12)
at Proxy.checkBulkPermissions
There's multiple overloads of the checkBulkPermissions function. We're then patching over the client using promisify, and I think it's effectively selecting the wrong overload, which is why typescript and the runtime appear to disagree.
Activity
tstirrat15 commentedon Jan 21, 2025
I think I see the issue.
https://github.com/authzed/authzed-node/blob/main/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts#L82-L84
There's multiple overloads of the
checkBulkPermissionsfunction. We're then patching over the client usingpromisify, and I think it's effectively selecting the wrong overload, which is why typescript and the runtime appear to disagree.We're doing some mucking around with the types in https://github.com/authzed/authzed-node/blob/main/src/types.ts#L80-L106, which is probably the source of the issue. I've at least got a reproduction locally.
I'll keep you posted.