typegraphql-prisma icon indicating copy to clipboard operation
typegraphql-prisma copied to clipboard

Support for Prisma 6

Open RubenNL opened this issue 1 year ago • 16 comments

Is your feature request related to a problem? Please describe.

Prisma version 6 has been released, which causes this warning:

Looks like an incorrect version "6.0.0" of the Prisma packages has been installed. 'typegraphql-prisma' works only with selected versions, so please ensure that you have installed a version of Prisma that meets the requirement: "^5.18.0". Find out more about that requirement in the docs: https://prisma.typegraphql.com/docs/basics/prisma-version

Bypassing this warning with SKIP_PRISMA_VERSION_CHECK=true works fine for my application, but I don't know if this is the same for everyone.

Describe the solution you'd like

For me, just updating the package.json version should be enough.

Describe alternatives you've considered

Additional context

https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6#breaking-changes

RubenNL avatar Nov 29 '24 10:11 RubenNL

Any update about it?

marticrespi avatar Jan 09 '25 06:01 marticrespi

Unfortunately, this is a significant reason not to use this tool. I understand that the maintainer is not obligated to fix every issue, but this is an important feature. It would be great to leave some tips for anyone with the bandwidth to contribute and help improve it.

cesarvspr avatar Jan 14 '25 17:01 cesarvspr

@cesarvspr Please make sure you're up to the statement here: https://github.com/MichalLytek/typegraphql-prisma/issues/385

The reality is that I don't use this tool anymore on my daily-basis at work, so I don't have the urge to dedicate my personal time for supporting this project anymore. Prisma abandoned sponsorship some time ago, and the sponsorship was the only reason I started this project.

So yes, without a help of community, there's no future for this project. However, maintaining compatibility with new Prisma releases is not so complex, so it shouldn't be an issue to make one or two releases a year.

If someone is willing to spend some time on actual digging in the code, fixing the tests after bumping dependencies, feel free to reach me if you need some help, assist or guide.

If you only want to yell and complain, there's nothing I can do for you.

MichalLytek avatar Jan 16 '25 12:01 MichalLytek

@MichalLytek Thank you for clarifying, and I’m sorry if my message came across the wrong way. I didn’t mean to yell or complain, and I completely understand your situation. My intention was simply to ask if there might be any guidance or information that could help anyone in the community who has the bandwidth to contribute. I truly appreciate the work you’ve put into this project and your willingness to assist others who want to take it forward.

cesarvspr avatar Jan 16 '25 16:01 cesarvspr

My workaround for now is overriding the dependencies using prisma 5.22.0:

package.json

  "pnpm": {
    "overrides": {
      "typegraphql-prisma": "npm:@prisma/[email protected]",
      "typegraphql-prisma": "npm:[email protected]"
    }
  }

jbdoster avatar Jan 29 '25 00:01 jbdoster

@jbdoster Can you share your whole package.json? I get a duplicate key error

Image

Thanks!

marticrespi avatar Feb 12 '25 12:02 marticrespi

Also interested on how to do the override Getting this error

Image

PS1TD avatar Mar 24 '25 20:03 PS1TD

@PS1TD I have this overrides in my package.json for another (previous) version.

  "overrides": {
    "typegraphql-prisma": {
      "@prisma/generator-helper": "<=5.13.0",
      "@prisma/internals": "<=5.13.0"
    }
  },

Of course, choose versions/packages accordingly. Just sharing snippet for how to achieve overrides.

kgrigor avatar May 11 '25 17:05 kgrigor

As per the docs here I set env var SKIP_PRISMA_VERSION_CHECK=true and so far I've not run into any issues with a Postgres datasource.

leomylonas avatar May 31 '25 05:05 leomylonas

There's more to this. The new generator prisma-client should be supported. @MichalLytek any chance to review the #478 from the same author of this issue?

ramiel avatar Aug 28 '25 10:08 ramiel

check https://www.npmjs.com/package/@ahmedhosnypro/typegraphql-prisma?activeTab=readme and https://github.com/MichalLytek/typegraphql-prisma/pull/490

ahmedhosnypro avatar Sep 28 '25 06:09 ahmedhosnypro

@ahmedhosnypro can you open issues on your github fork? This way we can communicate with you about any problem with the fork

ramiel avatar Sep 30 '25 12:09 ramiel

@ahmedhosnypro I tested your fork on a project and works great! @MichalLytek any chance we can get #490 merged in?

Jordan-Eckowitz avatar Oct 21 '25 02:10 Jordan-Eckowitz

@MichalLytek you asked for community help and the community responded back with a PR and it's pending your kind review Can you expedite it so we can move forward toward next versions?

omarragi avatar Nov 17 '25 17:11 omarragi

@omarragi I think I will go straight to Prisma 7 👀 https://github.com/MichalLytek/typegraphql-prisma/issues/491

MichalLytek avatar Nov 19 '25 15:11 MichalLytek