Skip to content

Commit

Permalink
Add mode and variant to info log
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Oct 18, 2019
1 parent 2bf9f3b commit e2f515e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/apollo-gateway/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ export class ApolloGateway implements GraphQLService {

public async load(options?: { engine?: GraphQLServiceEngineConfig }) {
await this.updateComposition(options);
const graphId = options && options.engine && options.engine.graphId;
this.logger.info(`Gateway loaded schema${graphId && ` for service ${graphId}`}.`)
const { graphId, graphVariant } = (options && options.engine) || {};
const mode = isManagedConfig(this.config) ? 'managed' : 'unmanaged';

this.logger.info(
`Gateway successfully loaded schema.\n\t* Mode: ${mode}${graphId ? `\n\t* Service: ${graphId}@${graphVariant || 'current'}`: ''}`,
);
if (this.experimental_pollInterval) {
setInterval(
() => this.updateComposition(options),
Expand Down

0 comments on commit e2f515e

Please sign in to comment.