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

Prisma 5.7.0 upsert opertions #92

Open
danil-iglu opened this issue Mar 15, 2024 · 0 comments
Open

Prisma 5.7.0 upsert opertions #92

danil-iglu opened this issue Mar 15, 2024 · 0 comments

Comments

@danil-iglu
Copy link

danil-iglu commented Mar 15, 2024

Bug description

I have a following error during compilation when I trying to use types.

  The types of '_type.update' are incompatible between these types.
    Type '(userUpdateWithoutProfileInput | userUncheckedUpdateWithoutProfileInput) & (userUpdateWithoutProfileInput | userUncheckedUpdateWithoutProfileInput | undefined)' is not assignable to type '(Without<userUpdateWithoutProfileInput, userUncheckedUpdateWithoutProfileInput> & userUncheckedUpdateWithoutProfileInput) | (Without<...> & userUpdateWithoutProfileInput)'.
      Type 'userUpdateWithoutProfileInput & userUncheckedUpdateWithoutProfileInput' is not assignable to type '(Without<userUpdateWithoutProfileInput, userUncheckedUpdateWithoutProfileInput> & userUncheckedUpdateWithoutProfileInput) | (Without<...> & userUpdateWithoutProfileInput)'.
        Type 'userUpdateWithoutProfileInput & userUncheckedUpdateWithoutProfileInput' is not assignable to type 'Without<userUncheckedUpdateWithoutProfileInput, userUpdateWithoutProfileInput> & userUpdateWithoutProfileInput'.
          Type 'userUpdateWithoutProfileInput & userUncheckedUpdateWithoutProfileInput' is not assignable to type 'Without<userUncheckedUpdateWithoutProfileInput, userUpdateWithoutProfileInput>'.
            Types of property 'ipdId' are incompatible.
              Type 'string | NullableStringFieldUpdateOperationsInput | null | undefined' is not assignable to type 'undefined'.
                Type 'null' is not assignable to type 'undefined'.ts(2322)

The error happens with this:

  export type NullableStringFieldUpdateOperationsInput = {
    set?: string | null
  }

How to reproduce

Generate with mentioned prisma version and see upsert operation result.

UPD: another case is multiple unique keys in the model - the schema is generated incorrectly. It breaks the compilation.

Expected behavior

No response

Prisma information

Unable to provide

Environment & setup

  • OS:
  • Database:
  • Node.js version:
    Mac, Postgres, latest Node 18

Prisma Version

5.7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant