-
Notifications
You must be signed in to change notification settings - Fork 118
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
On Nexus Framework Transition #630
Comments
@jasonkuhrt Where do the docs that were previously in the README live now? |
Linked to in the first paragraph of the schema plugin docs
https://www.nexusjs.org/#/plugins/prisma?id=runtime-integration |
Ahh okay, I still don't have a good grasp of how the plugin integrates with the Nexus framework so I didn't realize that link was referring to functionality from Where does this leave active PRs that contained significant changes to documentation? Asking for a friend |
@ssalbdivad For your PR we'll take care of it! We'd like to eventually see plugin docs return to their respective repos and then have a cron job scrape them into the website. Quite a few details there to figure out first. |
Okay I will avoid merging the README changes into my feature branch then. Thanks! |
Please remove the nexus.js.org website. Everytime I search for something, that website shows up and it has such outdated docs. Or just stop robots crawling that site. The SEO for nexusjs.org is non-existent. |
@samrith-s Yep, another team is handling that in the weeks to come. Trust me we're all looking forward to that :) |
An update, after long repeated and non-trivial discussion @Weakky I and others (@janpio) eventually came to a conclusion that bundling prisma deps is the best thing we can do. We published Nexus' view on dep management here, which relates to this. A rough snapshot of the points:
|
Officially done now in https://github.com/graphql-nexus/nexus-plugin-prisma/releases/tag/0.16.0!
|
Hi, @jasonkuhrt. Thanks for sharing. Is there a typo in the suggested import changes? It says to remove the |
Yes there was a typo, fixed! |
I got the |
…us-plugin-prisma (#1886) * Update schema.ts to use nexus-plugin-prisma/schema * Update package.json to use nexus-plugin-prisma rather than nexus-prisma graphql-nexus/nexus-plugin-prisma#630 * fix(typescript/graphql-auth): remove prisma deps * fix: remove prisma dependencies that now come with nexus-plugin-prisma Co-authored-by: Nikolas <[email protected]> Co-authored-by: Jan Piotrowski <[email protected]>
@Akxe did you manage to get around that error? |
I got it working, yes. |
For users coming to this now please see the unframework annoucement |
For users coming to this now please see the unframework annoucement.
🚧 🚧 🚧 🚧 🚧 🚧
You may have heard that nexus is becoming a framework.
If you haven't, go learn about it now: graphql-nexus/nexus#373
This issue is about the detailed plans for nexus-prisma.
tl;dr
tentatively:
nexus-schema-plugin-prisma
nexus-schema-plugin-prisma
graphql-nexus/nexus-future
underplugin/prisma
labelThese changes will take place within the next few weeks feedback welcome
We hope most users are able to adopt the framework, but we want to, for the foreseeable future, keep the nexus schema prisma plugin usable too.
On npm packages
Our ideal solution and what we mentioned in the original nexus transition issue was that we would have one package, with the schema and framework plugins as their own respective modules in it. Something like this:
Nexus schema users:
Nexus framework users:
The problem with this is that the dependency trees of either plugin are quite different. The framework plugin bundles a number of "worktime" deps and Prisma deps. The schema plugin bundles almost nothing, and Prisma deps are just peer deps.
These are some of our concerns:
These three limitations seem unavoidable to us, as they hit the fundamental limits of packages/package-managers in Node. Either we accept those limitations or find a different approach.
The other approch is maintaining two packages. We don't think
nexus-prisma
is a good package name. If the framework plugin is callednexus-plugin-prisma
then we're thinking of calling the schema pluginnexus-schema-plugin-prisma
. To be sure this is verbose, but it is less worse than confusion, and it is in line with our goal to make schema compoponent level usage possible, while things get optimized for the framework.Until we can be sure the limitations are acceptable we will go with the alternative approach.
As an experiment we may also make the schema plugin available under
nexus-plugin-prisma/schema
. If we discover this works well enough, we'll open a discussion about turning this into the official way to consume the schema level plugin.On repos
We currently have two repos, one for the framework level one for schema level. We've discussed the benefit of how a monorepo can simplify things. However doing so will require some enhancements to our release management tool dripip. It does not support monorepos right now.
Also, if the npm packages cannot be unified anyways, then motivation for unifying the repos seems lessoned. For now we will probably just match the repo names to the npm package names. Thus this repo would be renamed
nexus-schema-plugin-prisma
.On github issues
Over the past months we've seen the difficulty users have on navigating and creating issues on the right repo. Our approach with the framework has been to invest into good labels and keeping everything central. Everything being component and first-party plugin issues. That is an ongoing transition and experiment though.
Nexus framework Prisma plugin issues are tracked there. This repo still has issues but we're thinking of migrating them to the framework repo. Once done, this repo's issues would be disabled. We see three reasons to do this:
t.crud
andt.model
abstraction. We see the future of these abstractions moving to the framework level where it is not coupled to Prisma but made more general and applicable. Once that happens the right place to talk about these issues will migrate from plugin repo to framework repo. Issues migrations are confusing. Centralizations keeps things simple here.On Docs
Our vision for framework plugins is a wholistic and uniform experience for application developers. This means as many enforced standards as possible on how plugins are built, shipped, etc. This extends to docs. The prisma plugin docs will thus integrate into the website. This may at first be manual, and then move to a system where plugin docs are pulled from their distributed locations (with the plugin source, repo). Either way, the docs in the README here will be extracted. In automated distributed model, the docs would live in the framework plugin repo.
Conclusion
This has been a windy path for us. After a lot of circular discussions and back and forth we've settled on this direction and these tradeoffs for now. Feedback would be most welcome. If you have ideas that you think we did not think of please do share!
The text was updated successfully, but these errors were encountered: