graphql-jerky 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/lib.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ import ts from 'typescript';
2
+ import { GraphQLSchema } from 'graphql';
3
+
4
+ interface SymbolReference {
5
+ module?: string;
6
+ symbol: string;
7
+ alias?: string;
8
+ property?: string;
9
+ }
10
+
11
+ declare function parseTypeResolvers(typeName: string, glob: string | string[]): Promise<Record<string, SymbolReference>>;
12
+ declare function parse$2(dirpath: string): Promise<Record<string, Record<string, SymbolReference>>>;
13
+
14
+ type FunctionDeclaration = ts.MethodDeclaration | ts.FunctionExpression | ts.ArrowFunction;
15
+ interface ScalarFnsInfo {
16
+ serializeFunc?: SymbolReference & {
17
+ declaration: FunctionDeclaration;
18
+ };
19
+ parseValueFunc?: SymbolReference & {
20
+ declaration: FunctionDeclaration;
21
+ };
22
+ parseLiteralFunc?: SymbolReference & {
23
+ declaration: FunctionDeclaration;
24
+ };
25
+ }
26
+ interface ScalarInfo extends ScalarFnsInfo {
27
+ type?: SymbolReference;
28
+ }
29
+ declare function parse$1(path: string): Promise<Record<string, ScalarInfo>>;
30
+
31
+ interface GenerateOptions {
32
+ scalarsInfo?: Awaited<ReturnType<typeof parse$1>>;
33
+ fieldDirectivesInfo?: Awaited<ReturnType<typeof parseTypeResolvers>>;
34
+ inputDirectivesInfo?: Awaited<ReturnType<typeof parseTypeResolvers>>;
35
+ resolversInfo?: Awaited<ReturnType<typeof parse$2>>;
36
+ subscribersInfo?: Awaited<ReturnType<typeof parseTypeResolvers>>;
37
+ graphqlModuleSpecifier?: string;
38
+ extMode?: "omit" | "replace" | "keep";
39
+ }
40
+ declare function createGenerator(schema: GraphQLSchema, options: GenerateOptions): {
41
+ generateSchema: (outfile: string) => string;
42
+ generateTypes: (outfile: string) => string;
43
+ generate: (outfile: string) => string;
44
+ };
45
+ declare function generateSchema(schema: GraphQLSchema, outfile: string, options?: GenerateOptions): string;
46
+ declare function generateTypes(schema: GraphQLSchema, outfile: string, options?: GenerateOptions): string;
47
+ declare function generate(schema: GraphQLSchema, outfile: string, options?: GenerateOptions): string;
48
+
49
+ declare function parse(glob: string | string[]): Promise<GraphQLSchema>;
50
+
51
+ export { createGenerator, generate, generateSchema, generateTypes, parse$2 as parseResolvers, parse$1 as parseScalars, parse as parseSchema, parseTypeResolvers };