From 928a703c34eb8bd17b49e71170ac42379dfebeb3 Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Mon, 15 Jul 2019 23:19:37 -0700 Subject: [PATCH 1/2] Remove excessive warning re graph variant --- packages/apollo-gateway/src/index.ts | 7 ++++++- packages/apollo-gateway/src/loadServicesFromStorage.ts | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/apollo-gateway/src/index.ts b/packages/apollo-gateway/src/index.ts index 12739579cfa..9b1c26e7582 100644 --- a/packages/apollo-gateway/src/index.ts +++ b/packages/apollo-gateway/src/index.ts @@ -111,7 +111,12 @@ export class ApolloGateway implements GraphQLService { } public async load(options?: { engine?: GraphQLServiceEngineConfig }) { - if (options) this.engineConfig = options.engine; + if (options && options.engine) { + if (!options.engine.graphVariant) + console.warn('No graph variant provided. Defaulting to `current`.'); + this.engineConfig = options.engine; + } + if (this.schema) { return { schema: this.schema, executor: this.executor }; } diff --git a/packages/apollo-gateway/src/loadServicesFromStorage.ts b/packages/apollo-gateway/src/loadServicesFromStorage.ts index a8350748c22..efe68e3ef4b 100644 --- a/packages/apollo-gateway/src/loadServicesFromStorage.ts +++ b/packages/apollo-gateway/src/loadServicesFromStorage.ts @@ -75,7 +75,6 @@ export async function getServiceDefinitionsFromStorage({ const secret = await fetchStorageSecret(graphId, apiKeyHash); if (!graphVariant) { - console.warn('No graphVariant specified, defaulting to "current".'); graphVariant = 'current'; } From b70a273bb938eb61fb9ee7f2dabee8a114861c1e Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Tue, 16 Jul 2019 17:13:03 +0300 Subject: [PATCH 2/2] Add CHANGELOG.md for #3043. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 336a7843e85..dec1e39acac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The version headers in this history reflect the versions of Apollo Server itself > The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the the appropriate changes within that release will be moved into the new section. -- _Nothing yet!_ +- `@apollo/gateway`: Don't print a warning about an unspecified "graph variant" (previously, and in many ways still, known as "schema tag") every few seconds. We do highly recommend specifying one when using the Apollo Platform features though! [PR #3043](https://github.com/apollographql/apollo-server/pull/3043) ### v2.7.0