@graphql-tools/load 7.3.0 → 7.3.1
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/package.json +2 -2
- package/es5/README.md +0 -8
- package/es5/documents.d.ts +0 -31
- package/es5/filter-document-kind.d.ts +0 -5
- package/es5/index.d.ts +0 -4
- package/es5/index.js +0 -873
- package/es5/index.mjs +0 -859
- package/es5/load-typedefs/collect-sources.d.ts +0 -14
- package/es5/load-typedefs/load-file.d.ts +0 -4
- package/es5/load-typedefs/options.d.ts +0 -2
- package/es5/load-typedefs/parse.d.ts +0 -10
- package/es5/load-typedefs.d.ts +0 -30
- package/es5/package.json +0 -38
- package/es5/schema.d.ts +0 -23
- package/es5/utils/custom-loader.d.ts +0 -3
- package/es5/utils/helpers.d.ts +0 -9
- package/es5/utils/pointers.d.ts +0 -5
- package/es5/utils/queue.d.ts +0 -10
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Source } from '@graphql-tools/utils';
|
|
2
|
-
import { LoadTypedefsOptions } from '../load-typedefs';
|
|
3
|
-
export declare function collectSources<TOptions>({ pointerOptionMap, options, }: {
|
|
4
|
-
pointerOptionMap: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
options: LoadTypedefsOptions<Partial<TOptions>>;
|
|
8
|
-
}): Promise<Source[]>;
|
|
9
|
-
export declare function collectSourcesSync<TOptions>({ pointerOptionMap, options, }: {
|
|
10
|
-
pointerOptionMap: {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
};
|
|
13
|
-
options: LoadTypedefsOptions<Partial<TOptions>>;
|
|
14
|
-
}): Source[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Source } from '@graphql-tools/utils';
|
|
2
|
-
import { LoadTypedefsOptions } from '../load-typedefs';
|
|
3
|
-
export declare function loadFile(pointer: string, options: LoadTypedefsOptions): Promise<Source[]>;
|
|
4
|
-
export declare function loadFileSync(pointer: string, options: LoadTypedefsOptions): Source[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Source } from '@graphql-tools/utils';
|
|
2
|
-
declare type AddValidSource = (source: Source) => void;
|
|
3
|
-
declare type ParseOptions = {
|
|
4
|
-
partialSource: Source;
|
|
5
|
-
options: any;
|
|
6
|
-
pointerOptionMap: any;
|
|
7
|
-
addValidSource: AddValidSource;
|
|
8
|
-
};
|
|
9
|
-
export declare function parseSource({ partialSource, options, pointerOptionMap, addValidSource }: ParseOptions): void;
|
|
10
|
-
export {};
|
package/es5/load-typedefs.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Source, BaseLoaderOptions, Loader } from '@graphql-tools/utils';
|
|
2
|
-
export declare type LoadTypedefsOptions<ExtraConfig = {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}> = BaseLoaderOptions & ExtraConfig & {
|
|
5
|
-
cache?: {
|
|
6
|
-
[key: string]: Source[];
|
|
7
|
-
};
|
|
8
|
-
loaders: Loader[];
|
|
9
|
-
filterKinds?: string[];
|
|
10
|
-
sort?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare type UnnormalizedTypeDefPointer = {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
} | string;
|
|
15
|
-
/**
|
|
16
|
-
* Asynchronously loads any GraphQL documents (i.e. executable documents like
|
|
17
|
-
* operations and fragments as well as type system definitions) from the
|
|
18
|
-
* provided pointers.
|
|
19
|
-
* @param pointerOrPointers Pointers to the sources to load the documents from
|
|
20
|
-
* @param options Additional options
|
|
21
|
-
*/
|
|
22
|
-
export declare function loadTypedefs<AdditionalConfig = Record<string, unknown>>(pointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadTypedefsOptions<Partial<AdditionalConfig>>): Promise<Source[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Synchronously loads any GraphQL documents (i.e. executable documents like
|
|
25
|
-
* operations and fragments as well as type system definitions) from the
|
|
26
|
-
* provided pointers.
|
|
27
|
-
* @param pointerOrPointers Pointers to the sources to load the documents from
|
|
28
|
-
* @param options Additional options
|
|
29
|
-
*/
|
|
30
|
-
export declare function loadTypedefsSync<AdditionalConfig = Record<string, unknown>>(pointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadTypedefsOptions<Partial<AdditionalConfig>>): Source[];
|
package/es5/package.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@graphql-tools/load/es5",
|
|
3
|
-
"version": "7.3.0",
|
|
4
|
-
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
|
-
"sideEffects": false,
|
|
6
|
-
"peerDependencies": {
|
|
7
|
-
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@graphql-tools/schema": "8.2.0",
|
|
11
|
-
"@graphql-tools/utils": "^8.2.0",
|
|
12
|
-
"p-limit": "3.1.0",
|
|
13
|
-
"tslib": "~2.3.0"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "ardatan/graphql-tools",
|
|
18
|
-
"directory": "packages/load"
|
|
19
|
-
},
|
|
20
|
-
"author": "Dotan Simha <dotansimha@gmail.com>",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"main": "index.js",
|
|
23
|
-
"module": "index.mjs",
|
|
24
|
-
"typings": "index.d.ts",
|
|
25
|
-
"typescript": {
|
|
26
|
-
"definition": "index.d.ts"
|
|
27
|
-
},
|
|
28
|
-
"exports": {
|
|
29
|
-
".": {
|
|
30
|
-
"require": "./index.js",
|
|
31
|
-
"import": "./index.mjs"
|
|
32
|
-
},
|
|
33
|
-
"./*": {
|
|
34
|
-
"require": "./*.js",
|
|
35
|
-
"import": "./*.mjs"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
package/es5/schema.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { LoadTypedefsOptions, UnnormalizedTypeDefPointer } from './load-typedefs';
|
|
2
|
-
import { GraphQLSchema, BuildSchemaOptions } from 'graphql';
|
|
3
|
-
import { MergeSchemasConfig } from '@graphql-tools/schema';
|
|
4
|
-
export declare type LoadSchemaOptions = BuildSchemaOptions & LoadTypedefsOptions & Partial<MergeSchemasConfig> & {
|
|
5
|
-
/**
|
|
6
|
-
* Adds a list of Sources in to `extensions.sources`
|
|
7
|
-
*
|
|
8
|
-
* Disabled by default.
|
|
9
|
-
*/
|
|
10
|
-
includeSources?: boolean;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Asynchronously loads a schema from the provided pointers.
|
|
14
|
-
* @param schemaPointers Pointers to the sources to load the schema from
|
|
15
|
-
* @param options Additional options
|
|
16
|
-
*/
|
|
17
|
-
export declare function loadSchema(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadSchemaOptions): Promise<GraphQLSchema>;
|
|
18
|
-
/**
|
|
19
|
-
* Synchronously loads a schema from the provided pointers.
|
|
20
|
-
* @param schemaPointers Pointers to the sources to load the schema from
|
|
21
|
-
* @param options Additional options
|
|
22
|
-
*/
|
|
23
|
-
export declare function loadSchemaSync(schemaPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[], options: LoadSchemaOptions): GraphQLSchema;
|
package/es5/utils/helpers.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import pLimit from 'p-limit';
|
|
2
|
-
/**
|
|
3
|
-
* Converts a string to 32bit integer
|
|
4
|
-
*/
|
|
5
|
-
export declare function stringToHash(str: string): number;
|
|
6
|
-
export declare type StackNext = () => void;
|
|
7
|
-
export declare type StackFn<T> = (input: T, next: StackNext) => void;
|
|
8
|
-
export declare function useStack<T>(...fns: Array<StackFn<T>>): (input: T) => void;
|
|
9
|
-
export declare function useLimit(concurrency: number): pLimit.Limit;
|
package/es5/utils/pointers.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { UnnormalizedTypeDefPointer } from './../load-typedefs';
|
|
2
|
-
export declare function normalizePointers(unnormalizedPointerOrPointers: UnnormalizedTypeDefPointer | UnnormalizedTypeDefPointer[]): {
|
|
3
|
-
ignore: string[];
|
|
4
|
-
pointerOptionMap: Record<string, Record<string, any>>;
|
|
5
|
-
};
|
package/es5/utils/queue.d.ts
DELETED