Skip to content

Support --json and --markdown for federated schema:check#1378

Merged
jgzuke merged 4 commits intomasterfrom
jgzuke/update-federated-json-markdown
Jul 15, 2019
Merged

Support --json and --markdown for federated schema:check#1378
jgzuke merged 4 commits intomasterfrom
jgzuke/update-federated-json-markdown

Conversation

@jgzuke
Copy link
Copy Markdown
Contributor

@jgzuke jgzuke commented Jul 5, 2019

Support --markdown and --json flags for apollo schema:check command. Reintroduce tests and update snapshots.

Also refactor check.ts slightly, including renaming serviceName to graphName in markdown output now that there is a more pronounced difference between the terms with federation.

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-cla
Copy link
Copy Markdown

@jgzuke: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@jgzuke jgzuke requested a review from justinanastos July 5, 2019 22:40
// Add a cosmetic line break
console.log("");

cli.table(compositionErrors, {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just curious, does the heroku table and the cli table display tables differently?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure! I havent seen the output of heroku table. This was moved from https://github.com/apollographql/apollo-tooling/pull/1378/files#diff-c61805bdfe85787383d4ae9927bd0774L567 to keep the non json/markdown behavior the same

}

if (!serviceName) {
const graphName = config.service && config.service.name;
Copy link
Copy Markdown
Contributor

@mayakoneval mayakoneval Jul 9, 2019

Choose a reason for hiding this comment

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

NBD: This might be a nice place for a comment explaining the naming conventions as a result of federation / the mismatch between this and the gateway!

@mayakoneval mayakoneval self-requested a review July 9, 2019 18:44
Copy link
Copy Markdown
Contributor

@mayakoneval mayakoneval left a comment

Choose a reason for hiding this comment

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

lgtm!

@jgzuke jgzuke merged commit 950908d into master Jul 15, 2019
@jgzuke jgzuke deleted the jgzuke/update-federated-json-markdown branch July 15, 2019 18:21
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.

3 participants