Skip to content

Commit 12e62b8

Browse files
committed
Revert "removed warnings from UploadAndComposePartialSchema and RemoveServiceAndCompose"
This reverts commit 4e9dbeb.
1 parent 4e9dbeb commit 12e62b8

2 files changed

Lines changed: 37 additions & 8 deletions

File tree

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

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export interface CheckPartialSchema_service {
5252
__typename: "ServiceMutation";
5353
/**
5454
* This mutation will not result in any changes to the implementing service
55-
*
55+
*
5656
* Run composition with the Implementing Service's partial schema replaced with the one provided
5757
* in the mutation's input. Store the composed schema, return the hash of the composed schema,
5858
* and any warnings and errors pertaining to composition.
59-
*
59+
*
6060
* This mutation will not run validation against operations.
6161
*/
6262
validatePartialSchemaOfImplementingServiceAgainstGraph: CheckPartialSchema_service_validatePartialSchemaOfImplementingServiceAgainstGraph;
@@ -179,11 +179,11 @@ export interface CheckSchema_service {
179179
/**
180180
* Validate, diff, and store a schema so the diff can be viewed by users in the UI.
181181
* This mutation will not mark the schema as "published".
182-
*
182+
*
183183
* One of "proposedSchema" or "proposedSchemaHash" must be provided.
184184
* If both are provided, the computed schema hash will be compared with the input hash,
185185
* an error will be returned if the hashes don't match.
186-
*
186+
*
187187
* If the "proposedSchemaHash" is specified, the already stored schema will be loaded.
188188
*/
189189
checkSchema: CheckSchema_service_checkSchema;
@@ -320,6 +320,12 @@ export interface RemoveServiceAndCompose_service_removeImplementingServiceAndTri
320320
line: number;
321321
}
322322

323+
export interface RemoveServiceAndCompose_service_removeImplementingServiceAndTriggerComposition_warnings {
324+
__typename: "SchemaCompositionWarning";
325+
locations: (RemoveServiceAndCompose_service_removeImplementingServiceAndTriggerComposition_warnings_locations | null)[];
326+
message: string;
327+
}
328+
323329
export interface RemoveServiceAndCompose_service_removeImplementingServiceAndTriggerComposition {
324330
__typename: "CompositionAndRemoveResult";
325331
/**
@@ -332,6 +338,14 @@ export interface RemoveServiceAndCompose_service_removeImplementingServiceAndTri
332338
* published to the implementing service if there were any errors encountered
333339
*/
334340
errors: (RemoveServiceAndCompose_service_removeImplementingServiceAndTriggerComposition_errors | null)[];
341+
/**
342+
* List of warnings encountered during composing implementing services into a complete schema.
343+
* Though a schema was composed for the graph with the proposed partial schema,
344+
* these warnings may indicate undesired behavior or lost information. We recommend that no service
345+
* is pushed with warnings that are not fully understood. Pushing an implementing service with warnings
346+
* in its composition result will result in updating the composition config.
347+
*/
348+
warnings: (RemoveServiceAndCompose_service_removeImplementingServiceAndTriggerComposition_warnings | null)[];
335349
/**
336350
* Whether the gateway link was updated.
337351
*/
@@ -442,6 +456,11 @@ export interface UploadAndComposePartialSchema_service_upsertImplementingService
442456
message: string;
443457
}
444458

459+
export interface UploadAndComposePartialSchema_service_upsertImplementingServiceAndTriggerComposition_warnings {
460+
__typename: "SchemaCompositionWarning";
461+
message: string;
462+
}
463+
445464
export interface UploadAndComposePartialSchema_service_upsertImplementingServiceAndTriggerComposition {
446465
__typename: "CompositionAndUpsertResult";
447466
/**
@@ -454,6 +473,14 @@ export interface UploadAndComposePartialSchema_service_upsertImplementingService
454473
* published to the implementing service if there were any errors encountered
455474
*/
456475
errors: (UploadAndComposePartialSchema_service_upsertImplementingServiceAndTriggerComposition_errors | null)[];
476+
/**
477+
* List of warnings encountered during composing implementing services into a complete schema.
478+
* Though a schema was composed for the graph with the proposed partial schema,
479+
* these warnings may indicate undesired behavior or lost information. We recommend that no service
480+
* is pushed with warnings that are not fully understood. Pushing an implementing service with warnings
481+
* in its composition result will result in updating the composition config.
482+
*/
483+
warnings: (UploadAndComposePartialSchema_service_upsertImplementingServiceAndTriggerComposition_warnings | null)[];
457484
/**
458485
* Whether the gateway link was updated.
459486
*/
@@ -469,10 +496,10 @@ export interface UploadAndComposePartialSchema_service {
469496
/**
470497
* Creates or updates an implementing service of a given "name" on the graph variant, then
471498
* updates the graph variant's composition configs/artifacts to reflect these changes.
472-
*
499+
*
473500
* An enriched SDL of the implementing service can be uploaded
474501
* via "implementingServiceConfiguration.partialSchema.partialSchemaSDL".
475-
*
502+
*
476503
* Alternatively, previously uploaded partial schema could be re-associated with the
477504
* implementing service via "implementingServiceConfiguration.partialSchema.partialSchemaHash".
478505
*/
@@ -1676,10 +1703,10 @@ export interface OperationDocumentInput {
16761703
/**
16771704
* Input for registering a partial schema to an implementing service.
16781705
* One of the fields must be specified (validated server-side).
1679-
*
1706+
*
16801707
* If a new partialSchemaSDL is passed in, this operation will store it before
16811708
* creating the association.
1682-
*
1709+
*
16831710
* If both the sdl and hash are specified, an error will be thrown if the provided
16841711
* hash doesn't match our hash of the sdl contents
16851712
*/

packages/apollo/src/commands/service/delete.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default class ServiceDelete extends ProjectCommand {
4444

4545
const {
4646
errors,
47+
warnings,
4748
updatedGateway
4849
} = await project.engine.removeServiceAndCompose({
4950
id: config.name,
@@ -55,6 +56,7 @@ export default class ServiceDelete extends ProjectCommand {
5556
serviceName: flags.serviceName,
5657
graphVariant,
5758
graphName: config.name,
59+
warnings,
5860
errors,
5961
updatedGateway
6062
};

0 commit comments

Comments
 (0)