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

Type inference broken for aggregation queries when extension is turned on. #23973

Open
seanemmer opened this issue Apr 25, 2024 · 0 comments
Open
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: client types Types in Prisma Client

Comments

@seanemmer
Copy link

seanemmer commented Apr 25, 2024

Bug description

When an extension is turned on (have attempted this with multiple extensions) it causes aggregation queries to show types that are not fully "computed" or "reduced" as compared to when an extension is off.

How to reproduce

Instally any extension, e.g. prisma-kysely

Attempt to run any aggregation query:
await snapshotDb.snapshotRecord.aggregate({_count:true})

Type shown by VSCode:
image

Expected behavior

image

Prisma Schema

model SnapshotRecord {
  id String @default(cuid()) @id
}

Environment & setup

Node.js v20.11.0

Prisma Version

"@prisma/client": "5.13.0"
"prisma": "5.13.0",
"prisma-extension-kysely": "2.1.0",
"prisma-kysely": "1.8.0",

@seanemmer seanemmer added the kind/bug A reported bug. label Apr 25, 2024
@Weakky Weakky added team/client Issue for team Client. bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. topic: client types Types in Prisma Client tech/typescript Issue for tech TypeScript. labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: client types Types in Prisma Client
Projects
None yet
Development

No branches or pull requests

2 participants