Skip to content

Commit 03cc05a

Browse files
evansJames Baxley
authored andcommitted
service:check add git info back (#1165)
* service:check add git info back * update types * add changelog entry
1 parent 55194e4 commit 03cc05a

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Upcoming
44

5+
- `apollo`
6+
- Add git info back to `checkSchema` to fix detail links[#1165](https://github.com/apollographql/apollo-tooling/pull/1165)
7+
58
## `apollo@2.8.0`
69

710
- `apollo@2.8.0`

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,14 @@ export interface CheckSchema_service_checkSchema {
7777
export interface CheckSchema_service {
7878
__typename: "ServiceMutation";
7979
/**
80-
* Validate, diff, and store a schema so the diff
81-
* can be viewed by users in the UI. This mutation
82-
* will not mark the schema as "published"
80+
* Validate, diff, and store a schema so the diff can be viewed by users in the UI.
81+
* This mutation will not mark the schema as "published".
82+
*
83+
* One of "proposedSchema" or "proposedSchemaHash" must be provided.
84+
* If both are provided, the computed schema hash will be compared with the input hash,
85+
* an error will be returned if the hashes don't match.
86+
*
87+
* If the "proposedSchemaHash" is specified, the already stored schema will be loaded.
8388
*/
8489
checkSchema: CheckSchema_service_checkSchema;
8590
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export function formatTimePeriod(hours: number): string {
4949

5050
interface TasksOutput {
5151
config: ApolloConfig;
52-
gitContext?: GitContext;
5352
checkSchemaResult: CheckSchema_service_checkSchema;
5453
shouldOutputJson: boolean;
5554
shouldOutputMarkdown: boolean;
@@ -237,6 +236,7 @@ export default class ServiceCheck extends ProjectCommand {
237236
task.output = "Resolving schema";
238237

239238
const schema = await project.resolveSchema({ tag });
239+
await gitInfo(this.log);
240240

241241
const historicParameters = validateHistoricParams({
242242
validationPeriod: flags.validationPeriod,
@@ -254,12 +254,11 @@ export default class ServiceCheck extends ProjectCommand {
254254
// XXX Looks like TS should be generating ReadonlyArrays instead
255255
schema: introspectionFromSchema(schema).__schema,
256256
tag: flags.tag,
257-
gitContext: ctx.gitContext,
257+
gitContext: await gitInfo(this.log),
258258
frontend: flags.frontend || config.engine.frontend,
259259
...(historicParameters && { historicParameters })
260260
}),
261261
config,
262-
gitContext: await gitInfo(this.log),
263262
shouldOutputJson: !!flags.json,
264263
shouldOutputMarkdown: !!flags.markdown
265264
};
@@ -355,7 +354,6 @@ export default class ServiceCheck extends ProjectCommand {
355354
}
356355

357356
const {
358-
gitContext,
359357
checkSchemaResult,
360358
config,
361359
shouldOutputJson,

0 commit comments

Comments
 (0)