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

Fix client localSchemaFile for vscode stats command #1634

Merged
merged 2 commits into from
Nov 19, 2019

Conversation

JakeDawkins
Copy link
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
Member

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
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 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.

None yet

2 participants