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

Update service:check detailed output order #1168

Merged
merged 3 commits into from
Apr 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- apollo
- Update `service:check`'s `--markdown` output to include clients affected, number of operations checked, pluralization improvements, and backticks around service and schema variant [#1164](https://github.com/apollographql/apollo-tooling/pull/1164)
- Update `service:check` output to show failures before passes [#1168](https://github.com/apollographql/apollo-tooling/pull/1168)

## `[email protected]`

Expand Down
16 changes: 8 additions & 8 deletions packages/apollo/src/commands/service/__tests__/check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ describe("service:check", () => {
})
).toMatchInlineSnapshot(`
"
FAIL ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`gitContext\` was removed
FAIL ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`schema\` was removed
FAIL ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`tag\` was removed
FAIL FIELD_CHANGED_TYPE \`Change.argNode\` changed type from \`NamedIntrospectionArg\` to \`NamedIntrospectionValue\`
FAIL FIELD_REMOVED \`Change.affectedClients\` was removed
FAIL FIELD_REMOVED \`NamedIntrospectionValue.printedType\` was removed
FAIL TYPE_REMOVED \`NamedIntrospectionArg\` removed

PASS ARG_REMOVED \`ServiceMutation.registerOperations\` arg \`manifestVersion\` was removed
PASS ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`historicParameters\` was removed
PASS FIELD_ADDED \`Service.schemaNotificationChannels\` was added
Expand All @@ -144,14 +152,6 @@ PASS FIELD_REMOVED \`Change.affectedClientIdVersionPairs\` was r
PASS FIELD_REMOVED \`Change.affectedClientReferenceIds\` was removed
PASS FIELD_REMOVED \`SchemaDiff.numberOfCheckedOperations\` was removed

FAIL ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`gitContext\` was removed
FAIL ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`schema\` was removed
FAIL ARG_REMOVED \`ServiceMutation.uploadSchema\` arg \`tag\` was removed
FAIL FIELD_CHANGED_TYPE \`Change.argNode\` changed type from \`NamedIntrospectionArg\` to \`NamedIntrospectionValue\`
FAIL FIELD_REMOVED \`Change.affectedClients\` was removed
FAIL FIELD_REMOVED \`NamedIntrospectionValue.printedType\` was removed
FAIL TYPE_REMOVED \`NamedIntrospectionArg\` removed

View full details at: https://engine-dev.apollographql.com/service/engine/checks?schemaTag=Detached%3A%20d664f715645c5f0bb5ad4f2260cd6cb8d19bbc68&schemaTagId=f9f68e7e-1b5f-4eab-a3da-1fd8cd681111&from=2019-03-26T22%3A25%3A12.887Z"
`);
});
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo/src/commands/service/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ export function formatHumanReadable({

table(
[
...nonBreakingChanges.map(formatChange),
...breakingChanges.map(formatChange),
// Add an empty line between, but only if there are both breaking changes and non-breaking changes.
nonBreakingChanges.length && breakingChanges.length ? {} : null,
...breakingChanges.map(formatChange)
...nonBreakingChanges.map(formatChange)
].filter(Boolean),
{
columns: [
Expand Down