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

Add gitContext to checkPartialSchema mutation #1560

Conversation

JakeDawkins
Copy link
Contributor

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

 - 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 JakeDawkins merged commit 11f869a into jbaxleyiii/improve-client-performance Oct 4, 2019
@JakeDawkins JakeDawkins deleted the jake/fix-federated-gitContext branch October 4, 2019 13:05
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
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.

1 participant