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

SchemaWhereInput type incorrect for id fields (emitIdAsIDType = true) #461

Open
FezVrasta opened this issue Aug 9, 2024 · 0 comments
Open
Labels
bug Something isn't working community Something initiated by the community

Comments

@FezVrasta
Copy link

FezVrasta commented Aug 9, 2024

Describe the Bug
I have the emitIdAsIDType option enabled, but when I have a schema like the following, the generated <Schema>WhereInput type types id as StringFilter rather than treating it as ID.

schema User {
  id  String  @id @default(uuid())
}

CleanShot 2024-08-09 at 9  44 06@2x

The same happens for WhereUniqueInput

CleanShot 2024-08-09 at 9  49 51@2x

This means I have to pass ids as String from my GraphQL queries.

To Reproduce

Generate the schema I provided above.

Expected Behavior

The filter should allow me to send ID types, not String.

Environment (please complete the following information):

  • OS: macOS 14.5
  • Node 20.11.1
  • typegraphql-prisma version 0.27.2
  • Prisma version 5.18
  • TypeScript version 5.5.3

Additional Context

@MichalLytek MichalLytek added bug Something isn't working community Something initiated by the community labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Something initiated by the community
Projects
None yet
Development

No branches or pull requests

2 participants