Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jan 31, 2025
1 parent 86221e6 commit 131cd27
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
21 changes: 16 additions & 5 deletions packages/gateway/src/commands/proxy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import cluster from 'node:cluster';
import { createGatewayRuntime, type GatewayConfigProxy } from '@graphql-hive/gateway-runtime';
import {
createGatewayRuntime,
type GatewayConfigProxy,
} from '@graphql-hive/gateway-runtime';
import { isUrl, PubSub } from '@graphql-mesh/utils';
import { defaultOptions, type AddCommand, type CLIContext, type GatewayCLIConfig } from '../cli';
import { getBuiltinPluginsFromConfig, getCacheInstanceFromConfig, loadConfig } from '../config';
import {
defaultOptions,
type AddCommand,
type CLIContext,
type GatewayCLIConfig,
} from '../cli';
import {
getBuiltinPluginsFromConfig,
getCacheInstanceFromConfig,
loadConfig,
} from '../config';
import { startServerForRuntime } from '../servers/startServerForRuntime';
import { handleFork } from './handleFork';
import { handleLoggingConfig } from './handleLoggingOption';


export const addCommand: AddCommand = (ctx, cli) =>
cli
.command('proxy')
Expand Down Expand Up @@ -191,4 +202,4 @@ export async function runProxy({ log }: CLIContext, config: ProxyConfig) {
...config,
log,
});
}
}
24 changes: 19 additions & 5 deletions packages/gateway/src/commands/supergraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,33 @@ import cluster from 'node:cluster';
import { lstat } from 'node:fs/promises';
import { dirname, isAbsolute, resolve } from 'node:path';
import { Option } from '@commander-js/extra-typings';
import { createGatewayRuntime, type GatewayConfigSupergraph, type GatewayGraphOSManagedFederationOptions, type GatewayHiveCDNOptions, type UnifiedGraphConfig } from '@graphql-hive/gateway-runtime';
import {
createGatewayRuntime,
type GatewayConfigSupergraph,
type GatewayGraphOSManagedFederationOptions,
type GatewayHiveCDNOptions,
type UnifiedGraphConfig,
} from '@graphql-hive/gateway-runtime';
import { isUrl, PubSub, registerTerminateHandler } from '@graphql-mesh/utils';
import { CodeFileLoader } from '@graphql-tools/code-file-loader';
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
import { loadTypedefs } from '@graphql-tools/load';
import { asArray, isValidPath } from '@graphql-tools/utils';
import { defaultOptions, type AddCommand, type CLIContext, type GatewayCLIConfig } from '../cli';
import { getBuiltinPluginsFromConfig, getCacheInstanceFromConfig, loadConfig } from '../config';
import {
defaultOptions,
type AddCommand,
type CLIContext,
type GatewayCLIConfig,
} from '../cli';
import {
getBuiltinPluginsFromConfig,
getCacheInstanceFromConfig,
loadConfig,
} from '../config';
import { startServerForRuntime } from '../servers/startServerForRuntime';
import { handleFork } from './handleFork';
import { handleLoggingConfig } from './handleLoggingOption';


export const addCommand: AddCommand = (ctx, cli) =>
cli
.command('supergraph')
Expand Down Expand Up @@ -387,4 +401,4 @@ export async function runSupergraph(
...config,
log,
});
}
}

0 comments on commit 131cd27

Please sign in to comment.