https://nexus.js.org/docs/database-access-with-prisma states that this plugin works with prisma1 (prisma 2 is still in preview)
however, nexus-prisma does not expose the functions mentioned in the docs:
import { makePrismaSchema, prismaObjectType } from "nexus-prisma";
both do not exist. It seems that nexus-prisma introduced a BREAKING CHANGE that was not documented in the release notes.
Which version of nexus-prisma are we supposed to use if we are still on prisma1?
ok, seems like something is wrong with the npm tags.
Currently "latest" on npm is 0.0.1-beta.6,
but this repo suggest its 0.3.7
Its weird as the 0.0.1-beta.x has been updating for this months as the latest version (even in 9 hours ago for 0.0.1-beta.7) but actually 0.3.7 is the most updated one...
What happens in the version management here?
A guess:
0.3.7 is via https://github.com/prisma/nexus-prisma/tree/master/packages/nexus-prisma0.0.1-beta.x is via https://github.com/prisma/nexus-prisma/blob/next/package.json (note the different branch)But @jasonkuhrt will be able to tell you more about why this is the case.
@janpio yes, default branch of the git repo is next.
The problem is, that in npm, you can publish any version. If someone npm install / yarn add your package, it will take the "latest" version in the registry, that i is the most recent published one. As far as i now, npm registry itself has no concept of higher or lower version number, so like in this case a 0.0.1-beta.0 can be more recent as a 0.3.7 version.
The only mechanism npm provides are the release tags. Usually you will publish normal "stable" version with the default "latest" tag and beta, alpha or prereleases with a different tag like "beta", "next" or so.
In this case, i think the most recent beta version was accidentially published with the default tag, as the older 0.0.1-beta.5 version was released with the beta tag: https://www.npmjs.com/package/nexus-prisma
This shows the need of a good, automated release-management and its a pitty that npm and github do not offer something better out-of-the-box. but that's off-topic
closing this now, but i think the maintainers should fix the wrong latest version
Let's keep this open for @jasonkuhrt, who works on this, to actually have a look and consider this feedback. I just supplied a drive by response but don't know anything about the motivations.
Hey 🙂👋 getting the versioning system sorted out and automated is a high priority. I will tackle it this month if not this week.
A guess:
@janpio 👍
i think the maintainers should fix the wrong latest version
@macrozone Agree, and thanks for raising the issue 🙏
What happens in the version management here?
@seed-of-apricot yes its confusing, even to me. We will need to figure out how Prisma 1 & 2 co-exist.
I will use this issue to track fixing the latest tag. I've also created several additional issues linked to here.
done
❯ npm info nexus-prisma | grep dist-tags -A2
dist-tags:
beta: 0.0.1-beta.7
latest: 0.3.7
Most helpful comment
done