Skip to content

Fix client localSchemaFile for vscode stats command#1634

Merged
JakeDawkins merged 2 commits intomasterfrom
jake/vscode-fix-client-stats
Nov 19, 2019
Merged

Fix client localSchemaFile for vscode stats command#1634
JakeDawkins merged 2 commits intomasterfrom
jake/vscode-fix-client-stats

Conversation

@JakeDawkins
Copy link
Copy Markdown
Contributor

Currently, if you click on the Apollo logo on the status bar, stats for the project you're working with are supposed to show, to confirm the config was setup properly and the extension has loaded.

If you're setting up a client project and using a localSchemaFile though, the stats will fail to load unless there is a service name also provided, which isn't required.

This removes the check in the stats loading function that forced a client to have a client.service.name even if not using graph manager to load the schema.

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.

@trevor-scheer
Copy link
Copy Markdown
Contributor

Can we tell if there's another configuration path where serviceID is required that this might affect? We might want something more like:

Boolean((this.serviceID || this.localSchemaFile) && (this.schema || this.serviceSchema))

This is just a stab / guess.

@JakeDawkins
Copy link
Copy Markdown
Contributor Author

@trevor-scheer I can check, but since this is only used for logging output to vscode, I don't think that'd matter. I tried something similar to what you dropped in but TS was v. angry 🙃

@JakeDawkins JakeDawkins force-pushed the jake/vscode-fix-client-stats branch from 0508578 to c669f3e Compare November 19, 2019 21:23
@JakeDawkins JakeDawkins merged commit 10b9819 into master Nov 19, 2019
@JakeDawkins JakeDawkins deleted the jake/vscode-fix-client-stats branch November 19, 2019 21:47
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.

2 participants