Closed SheaBelsky closed 1 year ago
It's on purpose. Because of #385, I don't have time to keep this lib always up to date.
And 90% of the time, Prisma version bumps don't break stuff. So I've changed ~
to ^
to let people try to use the newest version.
Maybe there should be a better warning or disclaimer that version x.y.z is tested and supported and newer might not work?
I understand that you lack the time/support to maintain this at the same level as before. As a result, I haven't upgraded to Prisma 4.16.2 since this library doesn't explicitly support it yet, exactly for the reason in this issue. If this library only explicitly supports version 4.15, then this library should reflect that so it's clear to implementors what the expectation is.
Maybe there should be a better warning or disclaimer that version x.y.z is tested and supported and newer might not work?
NPM would take care of this based on the version range OR on peer dependencies. If this library specifies peer dependencies for a specific version of Prisma, then NPM would warn developers if they try to use an incompatible version if Prisma. You could also add some sort of manual warning, but that seems like reinventing the wheel if NPM can already do something similar.
then NPM would warn developers
No, now NPM yells and errors when you have wrong version. You have to force install the wrong package version.
Describe the Bug The
orderByNulls
feature flag was recently promoted from preview to General Availability in Prisma 4.16.0.https://github.com/prisma/prisma/issues/19377
This shouldn't have impacted existing instances of TypeGraphQL-Prisma because:
However, I have experienced consistent compilation failures as a result of this feature. Consider this argument for a query:
Since this behavior is now the default, my generated resolvers (which believe that the flag is enabled) conflict with the generated Prisma client (which is still on version 4.15.0 with the feature flag off.) I was required to manually override all of the
@prisma
NPM dependencies to force them to be on version 4.15.0.The specific error:
Adding this to the bottom of my
package.json
file solved the issue:To Reproduce
OrderByWithRelation
types as part of a GraphQL resolver (such as an argument to an operation), then use that argument with the Prisma clientExpected Behavior I expect the version of
typegraphql-prisma
to be locked to the current compatible version, and not be flexible when it comes to the version of@prisma
dependencies that it relies on.Logs If applicable, add some console logs to help explain your problem. You can paste the errors with stack trace that were printed when the error occurred.
Environment (please complete the following information):
typegraphql-prisma
: 0.26.0Additional Context It would be possible to solve this error by locking all
@prisma
dependencies to the current minor version of@prisma/client
that is supported by removing the leading caret^
from these dependencies.These are the dependencies that would need to be tweaked:
I also recommend creating an
.npmrc
file in the root of the repo withsave-exact=true
as its contents to ensure that any future third-party libraries are always installed with their exact versions, and not with a flexible version.