nx-mesh
Version:
GraphQL Mesh support for Nx
33 lines (32 loc) • 933 B
TypeScript
import type { StringKeyOf } from 'type-fest';
/**
* Arguments that can be passed to the GraphQL Mesh CLI.
*/
export declare type Arguments = {
/**
* The directory where the mesh config is located.
*/
dir?: string;
fileType?: 'json' | 'ts' | 'js';
/**
* The port number to run on.
*/
port?: number;
/**
* Loads specific require.extensions before running the codegen
* and reading the configuration.
*/
require?: string | string[];
};
/**
* Arguments in a format accepted by the GraphQL Mesh CLI.
*/
export declare type CliArguments<TArgs extends Arguments = Arguments> = {
[Arg in StringKeyOf<TArgs> as `--${Arg}`]?: string;
};
/**
* Get a list of arguments that can be passed to the
* GraphQL Mesh CLI.
*/
export declare const getCliArguments: (options: Arguments) => CliArguments;
export declare const flatternCliArguments: (args: CliArguments) => string[];