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

enum fields are missing in select's type when clientExtensions preview feature is used #16535

Closed
gtolarc opened this issue Nov 30, 2022 · 2 comments · Fixed by #16540
Closed
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/regression A reported bug in functionality that used to work before. team/client Issue for team Client. topic: client types Types in Prisma Client topic: clientExtensions
Milestone

Comments

@gtolarc
Copy link

gtolarc commented Nov 30, 2022

Bug description

An error that did not exist in 4.6.1 occurs after upgrading to 4.7, and it seems that enum type fields are missing in select.

How to reproduce

v4.6.1
Screenshot 2022-11-30 at 11 29 07

v4.7
Screenshot 2022-11-30 at 11 30 14

"kind" field (enum) is missing

Expected behavior

No response

Prisma information

enum GameKind {
  KIND1
  KIND2
}

model Game {
  id   Int      @id @default(autoincrement())
  name String
  kind GameKind @default(KIND1)

  status Json @default("{}")

  grade   GameGrade? @relation(fields: [gradeId], references: [id])
  gradeId Int?

  tournament  Tournament?
  userProfits UserProfits[]

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt

  @@unique([name, kind])
  @@map(name: "game")
}

Environment & setup

  • OS: macOS
  • Database: PostgreSQL
  • Node.js version: v19.1.0

Prisma Version

prisma                  : 4.7.0
@prisma/client          : 4.7.0
Current platform        : darwin-arm64
Query Engine (Node-API) : libquery-engine 39190b250ebc338586e25e6da45e5e783bc8a635 (at node_modules/prisma/node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)
Migration Engine        : migration-engine-cli 39190b250ebc338586e25e6da45e5e783bc8a635 (at node_modules/prisma/node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine    : introspection-core 39190b250ebc338586e25e6da45e5e783bc8a635 (at node_modules/prisma/node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary           : prisma-fmt 39190b250ebc338586e25e6da45e5e783bc8a635 (at node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Format Wasm             : @prisma/prisma-fmt-wasm 4.7.0-74.39190b250ebc338586e25e6da45e5e783bc8a635
Default Engines Hash    : 39190b250ebc338586e25e6da45e5e783bc8a635
Studio                  : 0.477.0
@gtolarc gtolarc added the kind/bug A reported bug. label Nov 30, 2022
@eviefp eviefp added team/client Issue for team Client. topic: client types Types in Prisma Client kind/regression A reported bug in functionality that used to work before. and removed kind/bug A reported bug. labels Nov 30, 2022
@SevInf SevInf added the bug/2-confirmed Bug has been reproduced and confirmed. label Nov 30, 2022
@Jolg42 Jolg42 added this to the 4.8.0 milestone Nov 30, 2022
@SevInf
Copy link
Contributor

SevInf commented Dec 1, 2022

Hey @gtolarc and everybody else affected.
Thank you for the report!. We identified and fixed the issue. It will come out in 4.8.1 release later todaytomorrow.
Unitl that happens, you could disable clientExtensions preview feature - bug occurs only when it is used.

@SevInf SevInf changed the title enum field is missing in select's type since v4.7 enum fields are missing in select's type when clientExtensions preview feature is used Dec 1, 2022
@SevInf
Copy link
Contributor

SevInf commented Dec 2, 2022

4.7.1 is released, now it should work correctly even if clientExtensions preview feature is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/regression A reported bug in functionality that used to work before. team/client Issue for team Client. topic: client types Types in Prisma Client topic: clientExtensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants