Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Duplicate null in ENUM filters #442

Closed
pantharshit00 opened this issue Jan 27, 2020 · 2 comments
Closed

Duplicate null in ENUM filters #442

pantharshit00 opened this issue Jan 27, 2020 · 2 comments
Assignees
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Milestone

Comments

@pantharshit00
Copy link
Contributor

pantharshit00 commented Jan 27, 2020

Reproduction: https://github.com/harshit-test-org/prisma2-client-442

Right now the enum filters are being generated with duplicate null types when they are marked as optional in the schema.

image

@pantharshit00 pantharshit00 added bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug. process/candidate Candidate for next Milestone. labels Jan 27, 2020
@timsuchanek timsuchanek self-assigned this Jan 31, 2020
@janpio janpio added this to the Preview 22 milestone Jan 31, 2020
@janpio janpio removed the process/candidate Candidate for next Milestone. label Jan 31, 2020
@timsuchanek timsuchanek changed the title Duplicate types in ENUM filters Duplicate null in ENUM filters Feb 4, 2020
@timsuchanek
Copy link
Contributor

Update: This also applies to other Nullable Scalar filters:

export type NullableStringFilter = {
  equals?: string | null | null
  not?: string | null | NullableStringFilter | null
  in?: Enumerable<string> | null
  notIn?: Enumerable<string> | null
  lt?: string | null
  lte?: string | null
  gt?: string | null
  gte?: string | null
  contains?: string | null
  startsWith?: string | null
  endsWith?: string | null
}

@timsuchanek
Copy link
Contributor

Thanks a lot for reporting 🙏
This issue is fixed in the latest alpha version of prisma2.
You can try it out with npm i -g prisma2@alpha.

In case it’s not fixed for you - please let us know and we’ll reopen this issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

3 participants