Add gitContext to checkPartialSchema mutation#1560
Merged
JakeDawkins merged 2 commits intojbaxleyiii/improve-client-performancefrom Oct 4, 2019
Merged
Add gitContext to checkPartialSchema mutation#1560JakeDawkins merged 2 commits intojbaxleyiii/improve-client-performancefrom
JakeDawkins merged 2 commits intojbaxleyiii/improve-client-performancefrom
Conversation
- apollo-codegen-core@0.36.0-alpha.2 - apollo-codegen-flow@0.34.0-alpha.2 - apollo-codegen-scala@0.35.0-alpha.2 - apollo-codegen-swift@0.36.0-alpha.2 - apollo-codegen-typescript@0.36.0-alpha.2 - apollo-graphql@0.3.4-alpha.1 - apollo-language-server@1.16.0-alpha.2 - apollo@2.19.0-alpha.2 - vscode-apollo@1.11.0-alpha.2
JakeDawkins
pushed a commit
that referenced
this pull request
Oct 4, 2019
* This commit seeks to improve the performance when determining if a field is missing any @client directives when using local state with Apollo Client. Instead of recursing over the entire document for each field, we walk the tree once while checking the schema for any possible client side annotations. This PR is an initial take at improving this workload but doesn't complete the work. Still to be done includes supporting @client validation on fragment spreads * fix TS error on failure to clean up removed function * Improve startup performance of CLI by removing extra validation Historically, the language server was designed to be used just with the VS Code extension (and other editors) where, after loading the project, the first thing we want to do is validate all of the documents and schema. However, we resuse the base projects (client / server) in the CLI to share common work especially around document management. Due to this, when the CLI starts up, its runs a potentially expensive validation step regardless of if the command has anything to do with validation. Often this is a no-op because of a missing schema, but given the correct env variables that loading can still happen automatically (something to clean up later). This change moves the logic of "auto validate" to the concept of a workspace which is used in long running processes (currently the VS Code but soon the CLI watch mode) and keeps the base project class clean. It also removes the hack in place that helped to highlight this in the recent added test suite for client validation. * update changelog * Pragmatic take on improving codegen efficiency This simplifies the watch and non watch modes by only calling write within the watcher and not relying on the underyling documentChange events from the project base. It also add a *VERY* simple exclude support which is far from the right solution but prevents more loops then currently happen * Add gitContext to checkPartialSchema mutation (#1560) * add gitContext to federated checkPartialSchema mutation * Clarify changelog and fix typo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.