Skip to content
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

feat: allow importing schema from other package #533

Closed
wants to merge 3 commits into from

Conversation

knaeckeKami
Copy link
Collaborator

experiment for supporting monorepos

@knaeckeKami knaeckeKami changed the title feat: allow importing schema from other package# feat: allow importing schema from other package Aug 19, 2023
@knaeckeKami knaeckeKami self-assigned this Oct 4, 2023
@meg4cyberc4t
Copy link

Don't give it up! A very important feature!

@MattisBrizard
Copy link

Hi @knaeckeKami, I think this would be a top feature for monorepos
Do you think that there is still much to do to ship this feature ?

@knaeckeKami
Copy link
Collaborator Author

IMO it won't take much more to ship this, but I kinda abandoned it since there is an issue:

The current architecture uses built_value, it generates a Serializers object which knows how to serialize each generated built_value type.

ferry currently assumes that this serializers type can serialize all types - at least for offline mutations that's required.

But in a monorepo, every repo would generate its own Serializers instance, which only knows how to serialize the types form this repo.

I don't have a good solution for this right now.

@MattisBrizard
Copy link

It's not possible to have each package generate its own Serializers and merge it with the one from the schema?
As you mentioned here:

@knaeckeKami
Copy link
Collaborator Author

knaeckeKami commented Mar 11, 2024

That might be possible, but that would introduce cyclic dependencies; the final Serializers would need to depend on every package in the monorepo.
And then, what's the point of having a monorepo?

I assume you would like to be able to compile the packages independently of each other?

@knaeckeKami
Copy link
Collaborator Author

fixed by #606

@knaeckeKami knaeckeKami closed this Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants