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

Incremental rebuilds #6142

Closed
wants to merge 3 commits into from
Closed

Incremental rebuilds #6142

wants to merge 3 commits into from

Conversation

kamilkisiela
Copy link
Collaborator

Related: ardatan/graphql-tools#2816

incremental re-builds in codegen. It skips running any computations related to outputs when their documents, schemas didn’t change. Later on we could cache plugin outputs as well and run only those relevant. Even more interesting, we could calculate checksums and avoid generating unnecessary file even outside of watch mode

4s vs 0.4s

Nagranie.z.ekranu.2021-04-9.o.12.42.58.1.mov

This way when a new file is added, we generate only relevant outputs, not everything
@changeset-bot
Copy link

changeset-bot bot commented Jun 17, 2021

⚠️ No Changeset found

Latest commit: a918b14

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tgriesser
Copy link

@kamilkisiela is this still being actively worked on? Would love to see this sort of improvement and wanted to see if there's anything I could do to assist.

@kamilkisiela
Copy link
Collaborator Author

I would have to rebase the PR and adjust it a bit, because of the change in GraphQL tools Loaders.
The Loaders changed quite a bit :(

@kamilkisiela
Copy link
Collaborator Author

The idea here was to also persist some kind of metadata file to build/skip things between executions of graphql-codegen command.

@tgriesser
Copy link

The idea here was to also persist some kind of metadata file to build/skip things between executions of graphql-codegen command.

Ah nice, yeah that would be pretty useful - was starting to look into different options for speeding up the codegen by potentially building a smarter in-process watcher, which it looks like this is trying to do. We're using graphql-codegen (and several other graphql-tools) in the new v10 branch of Cypress: https://github.com/cypress-io/cypress/blob/10.0-release/graphql-codegen.yml and the codegen is a bit of a bottleneck when doing local development

@charlypoly
Copy link
Contributor

We will keep this PR as an inspiration for the upcoming work on CLI improvements.

@charlypoly charlypoly closed this Aug 4, 2022
@ardatan ardatan deleted the kamil-incremental branch July 24, 2024 11:09
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