Skip to content

Commit 2787c2c

Browse files
committed
Update federated service:check output (#1193)
* Fix pluralize function * Update schema:check --federated output
1 parent e6a27ac commit 2787c2c

5 files changed

Lines changed: 304 additions & 193 deletions

File tree

package-lock.json

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/apollo-language-server/src/engine/operations/checkPartialSchema.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const CHECK_PARTIAL_SCHEMA = gql`
1313
implementingServiceName: $implementingServiceName
1414
partialSchema: $partialSchema
1515
) {
16-
compositionConfig {
16+
compositionValidationDetails {
1717
schemaHash
1818
}
1919
errors {
@@ -22,7 +22,6 @@ export const CHECK_PARTIAL_SCHEMA = gql`
2222
warnings {
2323
message
2424
}
25-
didUpdateGateway: updatedGateway
2625
}
2726
}
2827
}

packages/apollo-language-server/src/graphqlTypes.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// GraphQL mutation operation: CheckPartialSchema
77
// ====================================================
88

9-
export interface CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph_compositionConfig {
10-
__typename: "CompositionConfig";
9+
export interface CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph_compositionValidationDetails {
10+
__typename: "CompositionValidationDetails";
1111
/**
1212
* Hash of the composed schema
1313
*/
@@ -25,11 +25,13 @@ export interface CheckPartialSchema_service_validatePartialSchemaOfImplementingS
2525
}
2626

2727
export interface CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph {
28-
__typename: "CompositionResult";
28+
__typename: "CompositionValidationResult";
2929
/**
30-
* The produced composition config. Will be null if there are any errors
30+
* Akin to a composition config, represents the partial schemas and implementing services that were used
31+
* in running composition. Will be null if any errors are encountered. Also may contain a schema hash if
32+
* one could be computed, which can be used for schema validation.
3133
*/
32-
compositionConfig: CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph_compositionConfig | null;
34+
compositionValidationDetails: CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph_compositionValidationDetails | null;
3335
/**
3436
* List of errors during composition. Errors mean that Apollo was unable to compose the
3537
* graph's implementing services into a GraphQL schema. This partial schema should not be
@@ -44,10 +46,6 @@ export interface CheckPartialSchema_service_validatePartialSchemaOfImplementingS
4446
* in its composition result will result in updating the composition config.
4547
*/
4648
warnings: (CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph_warnings | null)[];
47-
/**
48-
* Whether the gateway link was updated.
49-
*/
50-
didUpdateGateway: boolean;
5149
}
5250

5351
export interface CheckPartialSchema_service {

packages/apollo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"heroku-cli-util": "8.0.11",
6161
"listr": "0.14.3",
6262
"lodash": "4.17.11",
63+
"strip-ansi": "5.2.0",
6364
"tty": "1.0.1",
6465
"vscode-uri": "1.0.6"
6566
},

0 commit comments

Comments
 (0)