@graphql-tools/stitching-directives 3.1.13 → 3.1.14-alpha-c1f969d9556b274c8e1313a3d2a4742f231bc03a
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +929 -0
- package/dist/index.cjs +1196 -0
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +1193 -0
- package/package.json +32 -42
- package/cjs/defaultStitchingDirectiveOptions.js +0 -10
- package/cjs/extractVariables.js +0 -52
- package/cjs/federationToStitchingSDL.js +0 -116
- package/cjs/getSourcePaths.js +0 -25
- package/cjs/index.js +0 -6
- package/cjs/package.json +0 -1
- package/cjs/parseMergeArgsExpr.js +0 -77
- package/cjs/pathsFromSelectionSet.js +0 -29
- package/cjs/preparseMergeArgsExpr.js +0 -31
- package/cjs/properties.js +0 -70
- package/cjs/stitchingDirectives.js +0 -78
- package/cjs/stitchingDirectivesTransformer.js +0 -490
- package/cjs/stitchingDirectivesValidator.js +0 -119
- package/cjs/types.js +0 -0
- package/esm/defaultStitchingDirectiveOptions.js +0 -7
- package/esm/extractVariables.js +0 -48
- package/esm/federationToStitchingSDL.js +0 -112
- package/esm/getSourcePaths.js +0 -21
- package/esm/index.js +0 -3
- package/esm/parseMergeArgsExpr.js +0 -73
- package/esm/pathsFromSelectionSet.js +0 -25
- package/esm/preparseMergeArgsExpr.js +0 -27
- package/esm/properties.js +0 -63
- package/esm/stitchingDirectives.js +0 -74
- package/esm/stitchingDirectivesTransformer.js +0 -486
- package/esm/stitchingDirectivesValidator.js +0 -115
- package/esm/types.js +0 -0
- package/typings/defaultStitchingDirectiveOptions.d.cts +0 -2
- package/typings/defaultStitchingDirectiveOptions.d.ts +0 -2
- package/typings/extractVariables.d.cts +0 -7
- package/typings/extractVariables.d.ts +0 -7
- package/typings/federationToStitchingSDL.d.cts +0 -2
- package/typings/federationToStitchingSDL.d.ts +0 -2
- package/typings/getSourcePaths.d.cts +0 -3
- package/typings/getSourcePaths.d.ts +0 -3
- package/typings/index.d.cts +0 -3
- package/typings/index.d.ts +0 -3
- package/typings/parseMergeArgsExpr.d.cts +0 -3
- package/typings/parseMergeArgsExpr.d.ts +0 -3
- package/typings/pathsFromSelectionSet.d.cts +0 -2
- package/typings/pathsFromSelectionSet.d.ts +0 -2
- package/typings/preparseMergeArgsExpr.d.cts +0 -6
- package/typings/preparseMergeArgsExpr.d.ts +0 -6
- package/typings/properties.d.cts +0 -5
- package/typings/properties.d.ts +0 -5
- package/typings/stitchingDirectives.d.cts +0 -19
- package/typings/stitchingDirectives.d.ts +0 -19
- package/typings/stitchingDirectivesTransformer.d.cts +0 -3
- package/typings/stitchingDirectivesTransformer.d.ts +0 -3
- package/typings/stitchingDirectivesValidator.d.cts +0 -3
- package/typings/stitchingDirectivesValidator.d.ts +0 -3
- package/typings/types.d.cts +0 -35
- package/typings/types.d.ts +0 -35
package/typings/properties.d.cts
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
import { PropertyTree } from './types.cjs';
|
2
|
-
export declare function addProperty(object: Record<string, any>, path: Array<string | number>, value: any): void;
|
3
|
-
export declare function getProperty(object: Record<string, any>, path: Array<string>): any;
|
4
|
-
export declare function getProperties(object: Record<string, any>, propertyTree: PropertyTree): any;
|
5
|
-
export declare function propertyTreeFromPaths(paths: Array<Array<string>>): PropertyTree;
|
package/typings/properties.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
import { PropertyTree } from './types.js';
|
2
|
-
export declare function addProperty(object: Record<string, any>, path: Array<string | number>, value: any): void;
|
3
|
-
export declare function getProperty(object: Record<string, any>, path: Array<string>): any;
|
4
|
-
export declare function getProperties(object: Record<string, any>, propertyTree: PropertyTree): any;
|
5
|
-
export declare function propertyTreeFromPaths(paths: Array<Array<string>>): PropertyTree;
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { GraphQLDirective, GraphQLSchema } from 'graphql';
|
2
|
-
import { SubschemaConfig } from '@graphql-tools/delegate';
|
3
|
-
import { StitchingDirectivesOptions } from './types.cjs';
|
4
|
-
export interface StitchingDirectivesResult {
|
5
|
-
keyDirectiveTypeDefs: string;
|
6
|
-
computedDirectiveTypeDefs: string;
|
7
|
-
mergeDirectiveTypeDefs: string;
|
8
|
-
canonicalDirectiveTypeDefs: string;
|
9
|
-
stitchingDirectivesTypeDefs: string;
|
10
|
-
allStitchingDirectivesTypeDefs: string;
|
11
|
-
stitchingDirectivesValidator: (schema: GraphQLSchema) => GraphQLSchema;
|
12
|
-
stitchingDirectivesTransformer: (subschemaConfig: SubschemaConfig) => SubschemaConfig;
|
13
|
-
keyDirective: GraphQLDirective;
|
14
|
-
computedDirective: GraphQLDirective;
|
15
|
-
mergeDirective: GraphQLDirective;
|
16
|
-
canonicalDirective: GraphQLDirective;
|
17
|
-
allStitchingDirectives: Array<GraphQLDirective>;
|
18
|
-
}
|
19
|
-
export declare function stitchingDirectives(options?: StitchingDirectivesOptions): StitchingDirectivesResult;
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { GraphQLDirective, GraphQLSchema } from 'graphql';
|
2
|
-
import { SubschemaConfig } from '@graphql-tools/delegate';
|
3
|
-
import { StitchingDirectivesOptions } from './types.js';
|
4
|
-
export interface StitchingDirectivesResult {
|
5
|
-
keyDirectiveTypeDefs: string;
|
6
|
-
computedDirectiveTypeDefs: string;
|
7
|
-
mergeDirectiveTypeDefs: string;
|
8
|
-
canonicalDirectiveTypeDefs: string;
|
9
|
-
stitchingDirectivesTypeDefs: string;
|
10
|
-
allStitchingDirectivesTypeDefs: string;
|
11
|
-
stitchingDirectivesValidator: (schema: GraphQLSchema) => GraphQLSchema;
|
12
|
-
stitchingDirectivesTransformer: (subschemaConfig: SubschemaConfig) => SubschemaConfig;
|
13
|
-
keyDirective: GraphQLDirective;
|
14
|
-
computedDirective: GraphQLDirective;
|
15
|
-
mergeDirective: GraphQLDirective;
|
16
|
-
canonicalDirective: GraphQLDirective;
|
17
|
-
allStitchingDirectives: Array<GraphQLDirective>;
|
18
|
-
}
|
19
|
-
export declare function stitchingDirectives(options?: StitchingDirectivesOptions): StitchingDirectivesResult;
|
package/typings/types.d.cts
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
export interface PropertyTree {
|
2
|
-
[property: string]: null | PropertyTree;
|
3
|
-
}
|
4
|
-
export interface ParsedMergeArgsExpr {
|
5
|
-
args: Record<string, any>;
|
6
|
-
usedProperties: PropertyTree;
|
7
|
-
mappingInstructions?: Array<MappingInstruction>;
|
8
|
-
expansions?: Array<Expansion>;
|
9
|
-
}
|
10
|
-
export interface MappingInstruction {
|
11
|
-
destinationPath: Array<string>;
|
12
|
-
sourcePath: Array<string>;
|
13
|
-
}
|
14
|
-
export interface Expansion {
|
15
|
-
valuePath: Array<string>;
|
16
|
-
value: any;
|
17
|
-
mappingInstructions: Array<MappingInstruction>;
|
18
|
-
}
|
19
|
-
export type VariablePaths = Record<string, Array<string | number>>;
|
20
|
-
export interface StitchingDirectivesOptions {
|
21
|
-
keyDirectiveName?: string;
|
22
|
-
computedDirectiveName?: string;
|
23
|
-
mergeDirectiveName?: string;
|
24
|
-
canonicalDirectiveName?: string;
|
25
|
-
pathToDirectivesInExtensions?: Array<string>;
|
26
|
-
}
|
27
|
-
type Complete<T> = {
|
28
|
-
[P in keyof Required<T>]: Exclude<Pick<T, P> extends Required<Pick<T, P>> ? T[P] : T[P] | undefined, undefined>;
|
29
|
-
};
|
30
|
-
export type StitchingDirectivesFinalOptions = Complete<StitchingDirectivesOptions>;
|
31
|
-
export interface MergedTypeResolverInfo extends ParsedMergeArgsExpr {
|
32
|
-
fieldName: string;
|
33
|
-
returnsList: boolean;
|
34
|
-
}
|
35
|
-
export {};
|
package/typings/types.d.ts
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
export interface PropertyTree {
|
2
|
-
[property: string]: null | PropertyTree;
|
3
|
-
}
|
4
|
-
export interface ParsedMergeArgsExpr {
|
5
|
-
args: Record<string, any>;
|
6
|
-
usedProperties: PropertyTree;
|
7
|
-
mappingInstructions?: Array<MappingInstruction>;
|
8
|
-
expansions?: Array<Expansion>;
|
9
|
-
}
|
10
|
-
export interface MappingInstruction {
|
11
|
-
destinationPath: Array<string>;
|
12
|
-
sourcePath: Array<string>;
|
13
|
-
}
|
14
|
-
export interface Expansion {
|
15
|
-
valuePath: Array<string>;
|
16
|
-
value: any;
|
17
|
-
mappingInstructions: Array<MappingInstruction>;
|
18
|
-
}
|
19
|
-
export type VariablePaths = Record<string, Array<string | number>>;
|
20
|
-
export interface StitchingDirectivesOptions {
|
21
|
-
keyDirectiveName?: string;
|
22
|
-
computedDirectiveName?: string;
|
23
|
-
mergeDirectiveName?: string;
|
24
|
-
canonicalDirectiveName?: string;
|
25
|
-
pathToDirectivesInExtensions?: Array<string>;
|
26
|
-
}
|
27
|
-
type Complete<T> = {
|
28
|
-
[P in keyof Required<T>]: Exclude<Pick<T, P> extends Required<Pick<T, P>> ? T[P] : T[P] | undefined, undefined>;
|
29
|
-
};
|
30
|
-
export type StitchingDirectivesFinalOptions = Complete<StitchingDirectivesOptions>;
|
31
|
-
export interface MergedTypeResolverInfo extends ParsedMergeArgsExpr {
|
32
|
-
fieldName: string;
|
33
|
-
returnsList: boolean;
|
34
|
-
}
|
35
|
-
export {};
|