Skip to content

Commit 916a3eb

Browse files
committed
log mode and version
1 parent c77654f commit 916a3eb

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

packages/gateway/src/commands/proxy.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,16 @@ export const addCommand: AddCommand = (ctx, cli) =>
198198

199199
export type ProxyConfig = GatewayConfigProxy & GatewayCLIConfig;
200200

201-
export async function runProxy({ log }: CLIContext, config: ProxyConfig) {
201+
export async function runProxy(
202+
{ log, productName, version }: CLIContext,
203+
config: ProxyConfig,
204+
) {
202205
if (handleFork(log, config)) {
203206
return;
204207
}
205208

209+
log.info(`Starting ${productName} ${version} in proxy mode`);
210+
206211
log.info(`Proxying requests to ${config.proxy.endpoint}`);
207212

208213
const runtime = createGatewayRuntime(config);

packages/gateway/src/commands/subgraph.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ export const addCommand: AddCommand = (ctx, cli) =>
158158

159159
export type SubgraphConfig = GatewayConfigSubgraph & GatewayCLIConfig;
160160

161-
export async function runSubgraph({ log }: CLIContext, config: SubgraphConfig) {
161+
export async function runSubgraph(
162+
{ log, productName, version }: CLIContext,
163+
config: SubgraphConfig,
164+
) {
162165
let absSchemaPath: string | null = null;
163166
if (
164167
typeof config.subgraph === 'string' &&
@@ -180,6 +183,8 @@ export async function runSubgraph({ log }: CLIContext, config: SubgraphConfig) {
180183
return;
181184
}
182185

186+
log.info(`Starting ${productName} ${version} as subgraph`);
187+
183188
const runtime = createGatewayRuntime(config);
184189

185190
if (absSchemaPath) {

packages/gateway/src/commands/supergraph.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export const addCommand: AddCommand = (ctx, cli) =>
259259
export type SupergraphConfig = GatewayConfigSupergraph & GatewayCLIConfig;
260260

261261
export async function runSupergraph(
262-
{ log }: CLIContext,
262+
{ productName, version, log }: CLIContext,
263263
config: SupergraphConfig,
264264
) {
265265
let absSchemaPath: string | null = null;
@@ -329,6 +329,8 @@ export async function runSupergraph(
329329
return;
330330
}
331331

332+
log.info(`Starting ${productName} ${version} with supergraph`);
333+
332334
if (config.additionalTypeDefs) {
333335
const loaders = [new GraphQLFileLoader(), new CodeFileLoader()];
334336
const additionalTypeDefsArr = asArray(config.additionalTypeDefs);

0 commit comments

Comments
 (0)