Open
Description
hey! I've faced few typing issues when trying to customize some grpc callOptions per operation.
details
considering that client
is created via v1.NewClient()
. a request with custom callOptions
const response = await this.client.checkBulkPermissions(
checkBulkPermissionsRequest,
undefined,
{ deadline: Date.now() + config.SPICEDB_GRPC_TIMEOUT_MS }
);
will build fine, but on runtime, gRPC calls will fail with:
Trace: Error: Incorrect arguments passed
at Proxy.checkOptionalUnaryResponseArguments (/xxxxxxx/api/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/client.ts:229:15)
at Proxy.makeUnaryRequest (/xxxxxxx/api/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/src/client.ts:277:12)
at Proxy.checkBulkPermissions
==
but doing it this way
const response = await this.client.checkBulkPermissions(
checkBulkPermissionsRequest,
{ deadline: Date.now() + config.SPICEDB_GRPC_TIMEOUT_MS }
);
works fine, but will TS type fail 🤔
env
"@authzed/authzed-node": "^1.1.1",
"typescript": "5.4.4",
node v22
Metadata
Metadata
Assignees
Labels
No labels