Skip to content

Commit 3125d51

Browse files
authored
Add debug print statements around calls to Apollo GraphQL api (#1273)
* client:push add variable debugging * service:push add result debug print statement * Add changelog
1 parent af4fbe3 commit 3125d51

3 files changed

Lines changed: 8 additions & 1 deletion

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+
- Add debugging logs to `apollo client:push` and `apollo service:push` [# 1273](https://github.com/apollographql/apollo-tooling/pull/1273)
77
- `apollo-codegen-core`
88
- <First `apollo-codegen-core` related entry goes here>
99
- `apollo-codegen-flow`

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export default class ServicePush extends ClientCommand {
4545
operations: operationManifest,
4646
manifestVersion: 2
4747
};
48+
const { operations: _, ...restVariables } = variables;
49+
this.debug("Variables sent to Engine:");
50+
this.debug(restVariables);
51+
this.debug("Operations sent to Engine:");
52+
this.debug(operations);
4853

4954
await project.engine.registerOperations(variables);
5055

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ export default class ServicePush extends ProjectCommand {
134134
tag: response.tag ? response.tag.tag : null,
135135
code: response.code
136136
};
137+
this.debug("Result received from Engine:");
138+
this.debug(result);
137139
}
138140
}
139141
}

0 commit comments

Comments
 (0)