Skip to content

Commit ef5b10a

Browse files
committed
Leverage updated registerOperations API
Now that registerOperations supports version as an argument to the mutation, we can leverage this for v2 oeprations manifest work.
1 parent 99fa61d commit ef5b10a

3 files changed

Lines changed: 5 additions & 16 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ export const REGISTER_OPERATIONS = gql`
55
$id: ID!
66
$clientIdentity: RegisteredClientIdentityInput!
77
$operations: [RegisteredOperationInput!]!
8+
$manifestVersion: Int!
89
) {
910
service(id: $id) {
1011
registerOperations(
1112
clientIdentity: $clientIdentity
1213
operations: $operations
14+
manifestVersion: $manifestVersion
1315
)
1416
}
1517
}

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export interface RegisterOperationsVariables {
9797
id: string;
9898
clientIdentity: RegisteredClientIdentityInput;
9999
operations: RegisteredOperationInput[];
100+
manifestVersion: number;
100101
}
101102

102103
/* tslint:disable */
@@ -136,9 +137,6 @@ export interface SchemaTagInfo_service {
136137
}
137138

138139
export interface SchemaTagInfo {
139-
/**
140-
* Service by ID
141-
*/
142140
service: SchemaTagInfo_service | null;
143141
}
144142

@@ -177,13 +175,7 @@ export interface SchemaTagsAndFieldStats_service_stats_fieldStats_metrics {
177175

178176
export interface SchemaTagsAndFieldStats_service_stats_fieldStats {
179177
__typename: "ServiceFieldStatsRecord";
180-
/**
181-
* Dimensions of ServiceFieldStats that can be grouped by.
182-
*/
183178
groupBy: SchemaTagsAndFieldStats_service_stats_fieldStats_groupBy;
184-
/**
185-
* Metrics of ServiceFieldStats that can be aggregated over.
186-
*/
187179
metrics: SchemaTagsAndFieldStats_service_stats_fieldStats_metrics;
188180
}
189181

@@ -202,9 +194,6 @@ export interface SchemaTagsAndFieldStats_service {
202194
}
203195

204196
export interface SchemaTagsAndFieldStats {
205-
/**
206-
* Service by ID
207-
*/
208197
service: SchemaTagsAndFieldStats_service | null;
209198
}
210199

@@ -763,9 +752,6 @@ export interface GetSchemaByTag_service_Service {
763752
export type GetSchemaByTag_service = GetSchemaByTag_service_User | GetSchemaByTag_service_Service;
764753

765754
export interface GetSchemaByTag {
766-
/**
767-
* Current identity, null if not authenticated
768-
*/
769755
service: GetSchemaByTag_service | null;
770756
}
771757

packages/apollo/src/commands/client/push.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export default class ServicePush extends ClientCommand {
4040
version
4141
},
4242
id: config.name,
43-
operations: operationManifest
43+
operations: operationManifest,
44+
manifestVersion: 2
4445
};
4546

4647
await project.engine.registerOperations(variables);

0 commit comments

Comments
 (0)