UNPKG

1.49 kBTypeScriptView Raw
1export declare type PointerWithConfiguration<T = any> = {
2 [key: string]: T;
3};
4/**
5 * Configuration of each used extension
6 */
7export interface IExtensions {
8 [name: string]: any;
9}
10/**
11 * Multiple named projects
12 */
13export interface IGraphQLProjects {
14 projects: {
15 [name: string]: IGraphQLProject | IGraphQLProjectLegacy;
16 };
17}
18/**
19 * Structure of GraphQL Config
20 */
21export declare type IGraphQLConfig = IGraphQLProject | IGraphQLProjects | IGraphQLProjectLegacy;
22/**
23 * Legacy structure of GraphQL Config v2
24 */
25export interface IGraphQLProjectLegacy {
26 schemaPath: string;
27 includes?: string[];
28 excludes?: string[];
29 extensions?: {
30 [name: string]: any;
31 };
32}
33export declare type WithList<T> = T | T[];
34export declare type ElementOf<TList> = TList extends Array<infer TElement> ? TElement : never;
35export declare type SchemaPointer = WithList<string>;
36export declare type SchemaPointerSingle = ElementOf<SchemaPointer>;
37export declare type DocumentGlobPathPointer = string;
38export declare type DocumentPointer = WithList<DocumentGlobPathPointer>;
39/**
40 * GraphQL Project
41 */
42export interface IGraphQLProject {
43 schema: SchemaPointer;
44 documents?: DocumentPointer;
45 extensions?: IExtensions;
46 include?: string | string[];
47 exclude?: string | string[];
48}
49export interface GraphQLConfigResult {
50 config: IGraphQLConfig;
51 filepath: string;
52}
53//# sourceMappingURL=types.d.ts.map
\No newline at end of file