Skip to content

Commit

Permalink
Remove excessive warning re graph variant (apollographql/apollo-serve…
Browse files Browse the repository at this point in the history
…r#3043)

* Remove excessive warning re graph variant

* Add CHANGELOG.md for apollographql/apollo-server#3043.

Apollo-Orig-Commit-AS: apollographql/apollo-server@e8e8b60
  • Loading branch information
Jackson Kearl authored and abernix committed Jul 16, 2019
1 parent 14ce748 commit af9f41e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion gateway-js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down
1 change: 0 additions & 1 deletion gateway-js/src/loadServicesFromStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down

0 comments on commit af9f41e

Please sign in to comment.