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

[gql_build] Build to cache #36

Open
smkhalsa opened this issue Jan 21, 2020 · 2 comments
Open

[gql_build] Build to cache #36

smkhalsa opened this issue Jan 21, 2020 · 2 comments

Comments

@smkhalsa
Copy link
Member

I've been experimenting with the builders, and I think we should build most of the files to the cache rather than to source. We have 10 builders now, and the number of generated files is overwhelming.

Do any builders other than req_builder and data_builder really need to be built to source?

@smkhalsa smkhalsa changed the title [gql_build] Built to cache [gql_build] Build to cache Jan 21, 2020
@klavs
Copy link
Contributor

klavs commented Jan 22, 2020

I'm not sure about the implications of building to cache. If you play around and see it works well for cli, web and flutter, I'm open to such change.

An alternative I had in mind was something similar to part builder, where there is a post-processor which bundles built files into a single file. I think it is useful to see the genarated code.

I do not know what works the best, but I can certainly agree that there are too many files being generated.

Another thing to keep in mind is that some of the builders should be useful on their own, like AST builder which can be used in both Artemis and graphql-flutter.

@smkhalsa
Copy link
Member Author

Another option is to build to a source subdirectory (such as __generated__). I believe this is the default for the Apollo Codegen.

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

No branches or pull requests

2 participants