Skip to content

Commit 5d72ac1

Browse files
authored
Add tag awareness to client:push (#1307)
Add tag awareness to client:push
2 parents 0c4d9fa + 9efeab9 commit 5d72ac1

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Upcoming
44

55
- `apollo`
6-
- <First `apollo` related entry goes here>
6+
- update `client:push` to pass the tag / graphVariant [#1307](https://github.com/apollographql/apollo-tooling/pull/1307)
77
- `apollo-codegen-core`
88
- <First `apollo-codegen-core` related entry goes here>
99
- `apollo-codegen-flow`

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export const REGISTER_OPERATIONS = gql`
66
$clientIdentity: RegisteredClientIdentityInput!
77
$operations: [RegisteredOperationInput!]!
88
$manifestVersion: Int!
9+
$graphVariant: String
910
) {
1011
service(id: $id) {
1112
registerOperationsWithResponse(
1213
clientIdentity: $clientIdentity
1314
operations: $operations
1415
manifestVersion: $manifestVersion
16+
graphVariant: $graphVariant
1517
) {
1618
invalidOperations {
1719
errors {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ export interface RegisterOperationsVariables {
272272
clientIdentity: RegisteredClientIdentityInput;
273273
operations: RegisteredOperationInput[];
274274
manifestVersion: number;
275+
graphVariant?: string | null;
275276
}
276277

277278
/* tslint:disable */

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export default class ClientPush extends ClientCommand {
8787
},
8888
id: config.name,
8989
operations: operationManifest,
90-
manifestVersion: 2
90+
manifestVersion: 2,
91+
graphVariant: config.tag
9192
};
9293
const { operations: _op, ...restVariables } = variables;
9394
this.debug("Variables sent to Apollo");

0 commit comments

Comments
 (0)