Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove excessive warning re graph variant #3043

Merged
merged 4 commits into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion packages/apollo-gateway/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 packages/apollo-gateway/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