@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.
@@ -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,2 +0,0 @@
1
- import { LoadTypedefsOptions } from './../load-typedefs';
2
- export declare function applyDefaultOptions<T>(options: LoadTypedefsOptions<Partial<T>>): void;
@@ -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 {};
@@ -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;
@@ -1,3 +0,0 @@
1
- export declare function getCustomLoaderByPath(path: string, cwd: string): any;
2
- export declare function useCustomLoader(loaderPointer: any, cwd: string): Promise<any>;
3
- export declare function useCustomLoaderSync(loaderPointer: any, cwd: string): any;
@@ -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;
@@ -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
- };
@@ -1,10 +0,0 @@
1
- export declare function useQueue<T>(options?: {
2
- concurrency?: number;
3
- }): {
4
- add(fn: () => Promise<T>): void;
5
- runAll(): Promise<T[]>;
6
- };
7
- export declare function useSyncQueue<T>(): {
8
- add(fn: () => T): void;
9
- runAll(): void;
10
- };