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

VSCode: Schema tag switching #632

Merged
merged 10 commits into from
Oct 19, 2018
Merged

Conversation

trevor-scheer
Copy link
Member

This PR:

  • adds functionality to the VSCode extension for switching to / developing against different schema tags.
  • adds the ability to publish a schema to engine with a tag via the CLI and the --tag flag.

For context:
Schemas can be "branched" in a similar way that one might make a branch in a git repo. This concept allows developers to publish different "branches" (tags) of a schema to engine. Publishing a new tag to engine makes the new introspection available to a client, in this case, VSCode.

The result here is that an extension user can switch tags on the fly and expect all the benefits that an introspection provides: autocomplete, syntax errors, and other relevant information specific to that tag.

oct-18-2018 15-47-34

@ghost ghost added the 🎉 feature New addition or enhancement to existing solutions label Oct 18, 2018
Copy link
Contributor

@jbaxleyiii jbaxleyiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trevor-scheer a couple questions!

packages/apollo-language-server/src/project.ts Outdated Show resolved Hide resolved
packages/apollo-language-server/src/project.ts Outdated Show resolved Hide resolved
packages/apollo/src/config.ts Outdated Show resolved Hide resolved
@jbaxleyiii
Copy link
Contributor

@trevor-scheer one thing else it would probably be better for this to be a command palate command instead of a click event on the status bar

Copy link
Contributor

@jbaxleyiii jbaxleyiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After thinking about this, I do think we should make it a command palate vs click interaction

@trevor-scheer trevor-scheer force-pushed the trevor/vscode-schema-switching branch from 3d340c2 to 6920ea2 Compare October 19, 2018 17:05
@trevor-scheer
Copy link
Member Author

@jbaxleyiii command palette change: 6920ea2

@trevor-scheer trevor-scheer force-pushed the trevor/vscode-schema-switching branch from 6920ea2 to 91fbed1 Compare October 19, 2018 19:26
@trevor-scheer trevor-scheer merged commit 922fa0b into vNEXT Oct 19, 2018
this._onSchemaTags && this._onSchemaTags(this.schemaTags);
})
.catch(error => {
console.error(error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an error that should be send to the loading handler? Otherwise I think the the indicator would get stuck.

@trevor-scheer trevor-scheer deleted the trevor/vscode-schema-switching branch November 14, 2018 18:26
abernix added a commit that referenced this pull request Nov 27, 2018
It appears that the original necessity for `tsc-watch` was introduced
through new usage within `npm-scripts` commands in
#632.

Since that usage is no longer present (at least partially removed via
5f287d9), this dependency should no longer
be necessary either.

This is relatively urgent since `tsc-watch` includes the `event-stream` npm
package as a transitive dependency and that package is demonstrably
vulnerable:

Ref: dominictarr/event-stream#116

cc @martijnwalraven @jbaxleyiii @trevor-scheer @hwillson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 feature New addition or enhancement to existing solutions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants