-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Introduce monorepo architecture with scoped packages #3321
Comments
@yaacovCR Not sure I understand what problem is solved by monorepo design. With the monorepo design I see two possibilities:
Which one are you proposing?
Can you please elaborate on this one? |
@yaacovCR Thinking more about this, what we can do is to replicate |
It is tricky to manage compatible versions within a monorepo, so we could start with #1. Ideally, you would properly indicate which patch versions are required for every patch release of every module. the use case is as mentioned above, much easier approach to forking executor. i am not sure why build step with Babel is easier than monorepo structure. |
You would generally speaking use a changeset like release workflow to manage this |
@yaacovCR A couple of reasons, from the top of my head:
I like your approach with
Can you please list what problems it solves? |
@yaacovCR Also in some situations companies/projects (e.g. today learned Apollo use a vendor copy in one of the projects) need to vendor |
We can publish 2 packages one that is a built verison how we do it today so end users do not need to worry about peer-deps. Other package is the one we used to build it which would allow users to swap out custom module versions. |
@saihaj Not sure I understand. Can you please describe it in more detail? |
so we make a new package |
@saihaj That wouldn't work if people use one code copy (
@saihaj Even if we workaround |
@saihaj Tree-shaking completely eliminates the problem of the package having files that you don't using. |
yes my suggestion based on the fact that we can bundle custom modules but you mentioned “multiple versions of GraphQL issue” so what I suggested won’t work or maybe 🤔 there is something else we can do |
Also let's not forget that monorepo has other cons I listed here: #3321 (comment) I actually like the idea of |
One of the goals of graphql executor is to allow for easily forking the executor, making small changes, and using the result. I think a Babel transform does not as easily allow for that as does a monorepo managed with changesets or lock step versioning. I don’t see a problem with publishing ‘@graphql/js-utils’ to npm, it’s an internal api but it’s not a secret |
On much later reflection, @IvanGoncharov , I think your raised a number of important blockers for the above work, especially the internal versioning and intercompatibility issue, the "internal" tools. I think it would be helpful in the long-term still to move in that direction, but it would certainly require work addressing your above points. I might be able to tackle work on some of those blockers, but not in the short or probably even medium-term. The overall goal is still excellent imo, i.e. making it easy to plug and play aspects of the graphql pipeline. How to get there is not so clear! |
Consider dividing this package into
@graphql/schema
,@graphql/execution
in a true multipackage monorepo design instead of the loosely divided current "module" setup.This would allow much easier forking of the executor for customization, without running into the "multiple versions of graphql issue."
A current alternative that points the way is
graphql-executor
.The text was updated successfully, but these errors were encountered: