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
[v2.17.0] Missing client TS types Aggregate*Args #5749
Comments
Alright i think i found the problem. It's seems that there's a problem with database tables named I first thought that it's a problem with my GraphQL query, which it wasn't. I'm not sure how this all relates to not generating the I renamed my table name in the schema and everything works fine: // Previous
// model Query {
model CalculatedQuery {
id Int @id @default(autoincrement())
color String?
collection String
query String @db.Text
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
} |
Same issue— would be nice to have some docs (or at least a more helpful error message) on not naming a table |
`DMMFHelper` did not take namespaces into account and merged them all into single map, based on the name. This is incorrect, since it is possible to have different type with the same name in different namespaces. In particular, this broke models named either `Query` or `Mutation` since they match built in names from `prisma` namespace. Now we have a separate map for each namespace. Fix #5749 Fix #9307 Fix #8153
`DMMFHelper` did not take namespaces into account and merged them all into single map, based on the name. This is incorrect, since it is possible to have different type with the same name in different namespaces. In particular, this broke models named either `Query` or `Mutation` since they match built in names from `prisma` namespace. Now we have a separate map for each namespace. Fix #5749 Fix #9307 Fix #8153
`DMMFHelper` did not take namespaces into account and merged them all into single map, based on the name. This is incorrect, since it is possible to have different type with the same name in different namespaces. In particular, this broke models named either `Query` or `Mutation` since they match built in names from `prisma` namespace. Now we have a separate map for each namespace. Fix #5749 Fix #9307 Fix #8153
This issue is fixed and will be available in Prisma 5.1 |
Since upgrading to v2.17.0 from v2.15.0 for both
@prisma/client
andprisma
i get an TypeScript error stating that theAggregate*Args
types are missing:After some digging around in
index.d.ts
I've found the typeAggregateUser
which in my understanding should replaceAggregateUserArgs
inaggregateUser<T extends AggregateUserArgs>
.Unfortunately downgrading to v2.15.0 has a similar error.
I've used:
prisma migrate dev --preview-feature
(added TableQuery
) after removing theprisma/migrations
folder (as suggested here, although i did not switch DB providers)prisma generate
prisma db seed --preview-feature
My prisma.schema:
The text was updated successfully, but these errors were encountered: