-
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
[FerryGenerator]How to make it work within a monorepo? #531
Comments
Hi! Nice to see you over there! Yes, you are right, this is not possible at the moment. But I think it should be relatively easy to implement. Will take a look. |
Well, actually it's not that simple. |
Hi thanks for taking the time to look at this.
|
A single package for the schema & the serializers would not work, I fear. If we have a single package for the schema, and N feature packages that contain operations (queries, mutations, subscriptions), the feature packages need to depend on the schema. But the serializers need to know both the schema and the operations, so this would cause circular dependencies. I think a way to solve this would be:
This might sound pretty scary, but I think all of this is doable with relatively small changes to the code. In fact, I hacked together something that already does most of this here: https://github.com/gql-dart/ferry/pull/533/files This would allow specifying the schema from another package and prevent code generation for the schema when passing |
Hi. I see you haven't written anything for a long time. Are there any updates? |
#606 was merged and ferry_generator 0.12.0 was released. A caveat is still, that OfflineMutationTypedLink won't work, because there's no single Serializers class which could deserialize any requests |
Hi!
First of all, thanks for this suite of packages.
We are using Ferry within a monorepo and using
ferry_generator
to generate the models. We would want to have each graphQL query in the dedicated package, it works well, but we need to have the schema in each packages and thus, all the generated code for the schema is duplicated in each package.We would want to have the schema in a dedicated package and be able to only generate the models of the schema in this package and not in the other ones.
Did I miss something or it's not possible for the moment?
The text was updated successfully, but these errors were encountered: