UNPKG

1.57 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?: IExtensions;
30}
31export declare type WithList<T> = T | T[];
32export declare type ElementOf<TList> = TList extends Array<infer TElement> ? TElement : never;
33export declare type SchemaPointer = WithList<string> | {
34 [url: string]: {
35 headers: {
36 [name: string]: string;
37 };
38 };
39}[];
40export declare type SchemaPointerSingle = ElementOf<SchemaPointer>;
41export declare type DocumentGlobPathPointer = string;
42export declare type DocumentPointer = WithList<DocumentGlobPathPointer>;
43/**
44 * GraphQL Project
45 */
46export interface IGraphQLProject {
47 schema: SchemaPointer;
48 documents?: DocumentPointer;
49 extensions?: IExtensions;
50 include?: WithList<string>;
51 exclude?: WithList<string>;
52}
53export interface GraphQLConfigResult {
54 config: IGraphQLConfig;
55 filepath: string;
56}
57//# sourceMappingURL=types.d.ts.map
\No newline at end of file