@soda-gql/core 0.0.2 → 0.0.3
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/dist/{index-AuafI3MM.d.ts → index-B0eMtGow.d.ts} +384 -335
- package/dist/index-B0eMtGow.d.ts.map +1 -0
- package/dist/{index-xC3mD3EI.d.cts → index-DsMrzee1.d.cts} +384 -335
- package/dist/index-DsMrzee1.d.cts.map +1 -0
- package/dist/index.cjs +74 -66
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +74 -42
- package/dist/index.js.map +1 -1
- package/dist/runtime/index.cjs +1 -1
- package/dist/runtime/index.d.cts +1 -1
- package/dist/runtime/index.d.cts.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/{slice-DhwBAhCw.cjs → slice-DlVY4UJG.cjs} +32 -13
- package/dist/{slice-B0ZSKvG2.js → slice-ua5mSfhV.js} +34 -15
- package/dist/slice-ua5mSfhV.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-AuafI3MM.d.ts.map +0 -1
- package/dist/index-xC3mD3EI.d.cts.map +0 -1
- package/dist/slice-B0ZSKvG2.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
|
|
2
2
|
import { ConstValueNode, FormattedExecutionResult, GraphQLFormattedError, NamedTypeNode, OperationTypeNode, TypeNode, ValueNode } from "graphql";
|
|
3
3
|
|
|
4
|
-
//#region packages/core/src/types/
|
|
4
|
+
//#region packages/core/src/types/type-foundation/const-value.d.ts
|
|
5
5
|
type ConstValue = string | number | boolean | null | undefined | {
|
|
6
6
|
readonly [key: string]: ConstValue;
|
|
7
7
|
} | readonly ConstValue[];
|
|
@@ -9,32 +9,153 @@ type ConstValues = {
|
|
|
9
9
|
readonly [key: string]: ConstValue;
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region packages/core/src/
|
|
13
|
-
|
|
14
|
-
type
|
|
12
|
+
//#region packages/core/src/types/type-foundation/type-modifier-core.generated.d.ts
|
|
13
|
+
type TypeModifier = string;
|
|
14
|
+
type ValidTypeModifier = "!" | "?" | "![]!" | "![]?" | "?[]!" | "?[]?" | "![]![]!" | "![]![]?" | "![]?[]!" | "![]?[]?" | "?[]![]!" | "?[]![]?" | "?[]?[]!" | "?[]?[]?" | "![]![]![]!" | "![]![]![]?" | "![]![]?[]!" | "![]![]?[]?" | "![]?[]![]!" | "![]?[]![]?" | "![]?[]?[]!" | "![]?[]?[]?" | "?[]![]![]!" | "?[]![]![]?" | "?[]![]?[]!" | "?[]![]?[]?" | "?[]?[]![]!" | "?[]?[]![]?" | "?[]?[]?[]!" | "?[]?[]?[]?";
|
|
15
|
+
interface Op$1<T$1> {
|
|
16
|
+
readonly 0: T$1[];
|
|
17
|
+
readonly 1: T$1[] | null | undefined;
|
|
18
|
+
}
|
|
19
|
+
type Modified_0<T$1> = T$1;
|
|
20
|
+
type Modified_1<T$1> = T$1 | null | undefined;
|
|
21
|
+
type Modified_00<T$1> = Op$1<Modified_0<T$1>>[0];
|
|
22
|
+
type Modified_01<T$1> = Op$1<Modified_0<T$1>>[1];
|
|
23
|
+
type Modified_10<T$1> = Op$1<Modified_1<T$1>>[0];
|
|
24
|
+
type Modified_11<T$1> = Op$1<Modified_1<T$1>>[1];
|
|
25
|
+
type Modified_000<T$1> = Op$1<Modified_00<T$1>>[0];
|
|
26
|
+
type Modified_001<T$1> = Op$1<Modified_00<T$1>>[1];
|
|
27
|
+
type Modified_010<T$1> = Op$1<Modified_01<T$1>>[0];
|
|
28
|
+
type Modified_011<T$1> = Op$1<Modified_01<T$1>>[1];
|
|
29
|
+
type Modified_100<T$1> = Op$1<Modified_10<T$1>>[0];
|
|
30
|
+
type Modified_101<T$1> = Op$1<Modified_10<T$1>>[1];
|
|
31
|
+
type Modified_110<T$1> = Op$1<Modified_11<T$1>>[0];
|
|
32
|
+
type Modified_111<T$1> = Op$1<Modified_11<T$1>>[1];
|
|
33
|
+
type Modified_0000<T$1> = Op$1<Modified_000<T$1>>[0];
|
|
34
|
+
type Modified_0001<T$1> = Op$1<Modified_000<T$1>>[1];
|
|
35
|
+
type Modified_0010<T$1> = Op$1<Modified_001<T$1>>[0];
|
|
36
|
+
type Modified_0011<T$1> = Op$1<Modified_001<T$1>>[1];
|
|
37
|
+
type Modified_0100<T$1> = Op$1<Modified_010<T$1>>[0];
|
|
38
|
+
type Modified_0101<T$1> = Op$1<Modified_010<T$1>>[1];
|
|
39
|
+
type Modified_0110<T$1> = Op$1<Modified_011<T$1>>[0];
|
|
40
|
+
type Modified_0111<T$1> = Op$1<Modified_011<T$1>>[1];
|
|
41
|
+
type Modified_1000<T$1> = Op$1<Modified_100<T$1>>[0];
|
|
42
|
+
type Modified_1001<T$1> = Op$1<Modified_100<T$1>>[1];
|
|
43
|
+
type Modified_1010<T$1> = Op$1<Modified_101<T$1>>[0];
|
|
44
|
+
type Modified_1011<T$1> = Op$1<Modified_101<T$1>>[1];
|
|
45
|
+
type Modified_1100<T$1> = Op$1<Modified_110<T$1>>[0];
|
|
46
|
+
type Modified_1101<T$1> = Op$1<Modified_110<T$1>>[1];
|
|
47
|
+
type Modified_1110<T$1> = Op$1<Modified_111<T$1>>[0];
|
|
48
|
+
type Modified_1111<T$1> = Op$1<Modified_111<T$1>>[1];
|
|
49
|
+
type ApplyTypeModifier<T$1, M extends TypeModifier> = M extends "!" ? Modified_0<T$1> : M extends "?" ? Modified_1<T$1> : M extends "![]!" ? Modified_00<T$1> : M extends "![]?" ? Modified_01<T$1> : M extends "?[]!" ? Modified_10<T$1> : M extends "?[]?" ? Modified_11<T$1> : M extends "![]![]!" ? Modified_000<T$1> : M extends "![]![]?" ? Modified_001<T$1> : M extends "![]?[]!" ? Modified_010<T$1> : M extends "![]?[]?" ? Modified_011<T$1> : M extends "?[]![]!" ? Modified_100<T$1> : M extends "?[]![]?" ? Modified_101<T$1> : M extends "?[]?[]!" ? Modified_110<T$1> : M extends "?[]?[]?" ? Modified_111<T$1> : M extends "![]![]![]!" ? Modified_0000<T$1> : M extends "![]![]![]?" ? Modified_0001<T$1> : M extends "![]![]?[]!" ? Modified_0010<T$1> : M extends "![]![]?[]?" ? Modified_0011<T$1> : M extends "![]?[]![]!" ? Modified_0100<T$1> : M extends "![]?[]![]?" ? Modified_0101<T$1> : M extends "![]?[]?[]!" ? Modified_0110<T$1> : M extends "![]?[]?[]?" ? Modified_0111<T$1> : M extends "?[]![]![]!" ? Modified_1000<T$1> : M extends "?[]![]![]?" ? Modified_1001<T$1> : M extends "?[]![]?[]!" ? Modified_1010<T$1> : M extends "?[]![]?[]?" ? Modified_1011<T$1> : M extends "?[]?[]![]!" ? Modified_1100<T$1> : M extends "?[]?[]![]?" ? Modified_1101<T$1> : M extends "?[]?[]?[]!" ? Modified_1110<T$1> : M extends "?[]?[]?[]?" ? Modified_1111<T$1> : never;
|
|
15
50
|
//#endregion
|
|
16
|
-
//#region packages/core/src/types/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
type
|
|
23
|
-
[key: string]:
|
|
24
|
-
|
|
51
|
+
//#region packages/core/src/types/type-foundation/type-profile.d.ts
|
|
52
|
+
interface PrimitiveTypeProfile {
|
|
53
|
+
readonly kind: "scalar" | "enum";
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly value: any;
|
|
56
|
+
}
|
|
57
|
+
type TypeProfile = [PrimitiveTypeProfile] | {
|
|
58
|
+
readonly [key: string]: TypeProfile.WithMeta;
|
|
59
|
+
};
|
|
60
|
+
declare namespace TypeProfile {
|
|
61
|
+
type WITH_DEFAULT_INPUT = "with_default_input";
|
|
62
|
+
type WithMeta = [TypeProfile, TypeModifier, WITH_DEFAULT_INPUT?];
|
|
63
|
+
type Type<TProfile extends TypeProfile.WithMeta> = (TProfile[0] extends [PrimitiveTypeProfile] ? ApplyTypeModifier<TProfile[0][0]["value"], TProfile[1]> : { readonly [K in keyof TProfile[0]]: TProfile[0][K] extends TypeProfile.WithMeta ? Type<TProfile[0][K]> : never }) | (TProfile[2] extends WITH_DEFAULT_INPUT ? undefined : never);
|
|
64
|
+
type AssignableSignature<TProfile extends TypeProfile.WithMeta> = ApplyTypeModifier<"[TYPE_SIGNATURE]", TProfile[1]> | (TProfile[2] extends WITH_DEFAULT_INPUT ? undefined : never);
|
|
65
|
+
type Signature<TProfile extends TypeProfile.WithMeta> = ApplyTypeModifier<"[TYPE_SIGNATURE]", TProfile[1]> extends infer T ? TProfile[2] extends WITH_DEFAULT_INPUT ? Exclude<T, undefined> : T : never;
|
|
66
|
+
type AssignableVarRefMeta<TProfile extends TypeProfile.WithMeta> = {
|
|
67
|
+
profile: TProfile[0];
|
|
68
|
+
signature: AssignableSignature<TProfile>;
|
|
25
69
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
70
|
+
type AssigningVarRefMeta<TProfile extends TypeProfile.WithMeta> = {
|
|
71
|
+
profile: TProfile[0];
|
|
72
|
+
signature: Signature<TProfile>;
|
|
73
|
+
};
|
|
74
|
+
type AssignableType<TProfile extends TypeProfile.WithMeta> = ApplyTypeModifier<TProfile[0] extends [PrimitiveTypeProfile] ? TProfile[0][0]["value"] : { readonly [K in keyof TProfile[0]]: TProfile[0][K] extends TypeProfile.WithMeta ? AssignableType<TProfile[0][K]> : never }, TProfile[1]> | VarRef<AssignableVarRefMeta<TProfile>>;
|
|
75
|
+
type AssigningType<TProfile extends TypeProfile.WithMeta> = VarRef<AssigningVarRefMeta<TProfile>>;
|
|
76
|
+
}
|
|
77
|
+
type GetModifiedType<TProfile extends TypeProfile, TModifier extends TypeModifier> = TypeProfile.Type<[TProfile, TModifier]>;
|
|
78
|
+
type GetConstAssignableType<TProfile extends TypeProfile.WithMeta> = TypeProfile.Type<TProfile>;
|
|
79
|
+
type GetAssigningType<TProfile extends TypeProfile.WithMeta> = TypeProfile.AssigningType<TProfile>;
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region packages/core/src/types/type-foundation/var-ref.d.ts
|
|
82
|
+
interface AnyVarRefMeta {
|
|
83
|
+
readonly profile: TypeProfile;
|
|
84
|
+
readonly signature: unknown;
|
|
85
|
+
}
|
|
86
|
+
type VarRefInner = {
|
|
87
|
+
type: "variable";
|
|
88
|
+
name: string;
|
|
89
|
+
} | {
|
|
90
|
+
type: "const-value";
|
|
91
|
+
value: ConstValue;
|
|
31
92
|
};
|
|
32
|
-
|
|
93
|
+
type AnyVarRef = VarRef<any>;
|
|
94
|
+
declare const __VAR_REF_BRAND__: unique symbol;
|
|
95
|
+
declare class VarRef<TMeta extends AnyVarRefMeta> {
|
|
96
|
+
private readonly inner;
|
|
97
|
+
readonly [__VAR_REF_BRAND__]: TMeta;
|
|
98
|
+
constructor(inner: VarRefInner);
|
|
99
|
+
static getInner(varRef: AnyVarRef): VarRefInner;
|
|
100
|
+
}
|
|
101
|
+
declare const isVarRef: (value: unknown) => value is AnyVarRef;
|
|
102
|
+
declare const createVarRefFromVariable: <TProfile extends TypeProfile.WithMeta>(name: string) => VarRef<TypeProfile.AssigningVarRefMeta<TProfile>>;
|
|
103
|
+
declare const createVarRefFromConstValue: <TProfile extends TypeProfile.WithMeta>(value: ConstValue) => VarRef<TypeProfile.AssigningVarRefMeta<TProfile>>;
|
|
104
|
+
declare const getVarRefInner: (varRef: AnyVarRef) => VarRefInner;
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region packages/core/src/utils/type-meta.d.ts
|
|
107
|
+
interface WithTypeMeta<T$1 extends object> {
|
|
108
|
+
readonly $type: T$1;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region packages/core/src/types/type-foundation/modified-type-name.d.ts
|
|
112
|
+
type ModifiedTypeName<TNameCandidate extends [string], TName extends TNameCandidate[0], TModifier extends TypeModifier> = [string] extends TNameCandidate ? `${TName}:${TModifier}` : TNameCandidate extends [TName] ?
|
|
113
|
+
// First, user inputs TName based on TNameCandidate
|
|
114
|
+
NoInfer<`${TNameCandidate[0]}`> | (TName & NoInfer<TypeModifier extends TModifier ? never : string>) : `${TName}:${TModifier & ValidTypeModifier}`;
|
|
115
|
+
declare function parseModifiedTypeName<TNameCandidate extends [string], TName extends string, TModifier extends TypeModifier>(nameAndModifier: ModifiedTypeName<TNameCandidate, TName, TModifier>): {
|
|
33
116
|
name: TName;
|
|
34
117
|
modifier: TModifier;
|
|
35
118
|
};
|
|
36
119
|
//#endregion
|
|
37
|
-
//#region packages/core/src/types/
|
|
120
|
+
//#region packages/core/src/types/type-foundation/type-modifier-extension.generated.d.ts
|
|
121
|
+
interface Op<T$1> {
|
|
122
|
+
readonly 0: T$1[];
|
|
123
|
+
readonly 1: T$1[] | null | undefined;
|
|
124
|
+
}
|
|
125
|
+
type Ref<TProfile extends TypeProfile.WithMeta> = VarRef<TypeProfile.AssignableVarRefMeta<TProfile>>;
|
|
126
|
+
type Assignable_0<T$1 extends TypeProfile.WithMeta> = TypeProfile.AssignableType<[T$1[0], "!", T$1[2]]>;
|
|
127
|
+
type Assignable_1<T$1 extends TypeProfile.WithMeta> = TypeProfile.AssignableType<[T$1[0], "?", T$1[2]]>;
|
|
128
|
+
type Assignable_00<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]!", T$1[2]]> | Op<Assignable_0<[T$1[0], "!"]>>[0];
|
|
129
|
+
type Assignable_01<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?", T$1[2]]> | Op<Assignable_0<[T$1[0], "!"]>>[1];
|
|
130
|
+
type Assignable_10<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]!", T$1[2]]> | Op<Assignable_1<[T$1[0], "?"]>>[0];
|
|
131
|
+
type Assignable_11<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?", T$1[2]]> | Op<Assignable_1<[T$1[0], "?"]>>[1];
|
|
132
|
+
type Assignable_000<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]!", T$1[2]]> | Op<Assignable_00<[T$1[0], "!"]>>[0];
|
|
133
|
+
type Assignable_001<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]?", T$1[2]]> | Op<Assignable_00<[T$1[0], "!"]>>[1];
|
|
134
|
+
type Assignable_010<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]!", T$1[2]]> | Op<Assignable_01<[T$1[0], "!"]>>[0];
|
|
135
|
+
type Assignable_011<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]?", T$1[2]]> | Op<Assignable_01<[T$1[0], "!"]>>[1];
|
|
136
|
+
type Assignable_100<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]!", T$1[2]]> | Op<Assignable_10<[T$1[0], "?"]>>[0];
|
|
137
|
+
type Assignable_101<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]?", T$1[2]]> | Op<Assignable_10<[T$1[0], "?"]>>[1];
|
|
138
|
+
type Assignable_110<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]!", T$1[2]]> | Op<Assignable_11<[T$1[0], "?"]>>[0];
|
|
139
|
+
type Assignable_111<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]?", T$1[2]]> | Op<Assignable_11<[T$1[0], "?"]>>[1];
|
|
140
|
+
type Assignable_0000<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]![]!", T$1[2]]> | Op<Assignable_000<[T$1[0], "!"]>>[0];
|
|
141
|
+
type Assignable_0001<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]![]?", T$1[2]]> | Op<Assignable_000<[T$1[0], "!"]>>[1];
|
|
142
|
+
type Assignable_0010<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]?[]!", T$1[2]]> | Op<Assignable_001<[T$1[0], "!"]>>[0];
|
|
143
|
+
type Assignable_0011<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]?[]?", T$1[2]]> | Op<Assignable_001<[T$1[0], "!"]>>[1];
|
|
144
|
+
type Assignable_0100<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]![]!", T$1[2]]> | Op<Assignable_010<[T$1[0], "!"]>>[0];
|
|
145
|
+
type Assignable_0101<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]![]?", T$1[2]]> | Op<Assignable_010<[T$1[0], "!"]>>[1];
|
|
146
|
+
type Assignable_0110<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]?[]!", T$1[2]]> | Op<Assignable_011<[T$1[0], "!"]>>[0];
|
|
147
|
+
type Assignable_0111<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]?[]?", T$1[2]]> | Op<Assignable_011<[T$1[0], "!"]>>[1];
|
|
148
|
+
type Assignable_1000<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]![]!", T$1[2]]> | Op<Assignable_100<[T$1[0], "?"]>>[0];
|
|
149
|
+
type Assignable_1001<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]![]?", T$1[2]]> | Op<Assignable_100<[T$1[0], "?"]>>[1];
|
|
150
|
+
type Assignable_1010<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]?[]!", T$1[2]]> | Op<Assignable_101<[T$1[0], "?"]>>[0];
|
|
151
|
+
type Assignable_1011<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]?[]?", T$1[2]]> | Op<Assignable_101<[T$1[0], "?"]>>[1];
|
|
152
|
+
type Assignable_1100<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]![]!", T$1[2]]> | Op<Assignable_110<[T$1[0], "?"]>>[0];
|
|
153
|
+
type Assignable_1101<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]![]?", T$1[2]]> | Op<Assignable_110<[T$1[0], "?"]>>[1];
|
|
154
|
+
type Assignable_1110<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]?[]!", T$1[2]]> | Op<Assignable_111<[T$1[0], "?"]>>[0];
|
|
155
|
+
type Assignable_1111<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]?[]?", T$1[2]]> | Op<Assignable_111<[T$1[0], "?"]>>[1];
|
|
156
|
+
type GetAssignableType<T$1 extends TypeProfile.WithMeta> = T$1[1] extends "!" ? Assignable_0<T$1> : T$1[1] extends "?" ? Assignable_1<T$1> : T$1[1] extends "![]!" ? Assignable_00<T$1> : T$1[1] extends "![]?" ? Assignable_01<T$1> : T$1[1] extends "?[]!" ? Assignable_10<T$1> : T$1[1] extends "?[]?" ? Assignable_11<T$1> : T$1[1] extends "![]![]!" ? Assignable_000<T$1> : T$1[1] extends "![]![]?" ? Assignable_001<T$1> : T$1[1] extends "![]?[]!" ? Assignable_010<T$1> : T$1[1] extends "![]?[]?" ? Assignable_011<T$1> : T$1[1] extends "?[]![]!" ? Assignable_100<T$1> : T$1[1] extends "?[]![]?" ? Assignable_101<T$1> : T$1[1] extends "?[]?[]!" ? Assignable_110<T$1> : T$1[1] extends "?[]?[]?" ? Assignable_111<T$1> : T$1[1] extends "![]![]![]!" ? Assignable_0000<T$1> : T$1[1] extends "![]![]![]?" ? Assignable_0001<T$1> : T$1[1] extends "![]![]?[]!" ? Assignable_0010<T$1> : T$1[1] extends "![]![]?[]?" ? Assignable_0011<T$1> : T$1[1] extends "![]?[]![]!" ? Assignable_0100<T$1> : T$1[1] extends "![]?[]![]?" ? Assignable_0101<T$1> : T$1[1] extends "![]?[]?[]!" ? Assignable_0110<T$1> : T$1[1] extends "![]?[]?[]?" ? Assignable_0111<T$1> : T$1[1] extends "?[]![]![]!" ? Assignable_1000<T$1> : T$1[1] extends "?[]![]![]?" ? Assignable_1001<T$1> : T$1[1] extends "?[]![]?[]!" ? Assignable_1010<T$1> : T$1[1] extends "?[]![]?[]?" ? Assignable_1011<T$1> : T$1[1] extends "?[]?[]![]!" ? Assignable_1100<T$1> : T$1[1] extends "?[]?[]![]?" ? Assignable_1101<T$1> : T$1[1] extends "?[]?[]?[]!" ? Assignable_1110<T$1> : T$1[1] extends "?[]?[]?[]?" ? Assignable_1111<T$1> : never;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region packages/core/src/types/type-foundation/type-specifier.d.ts
|
|
38
159
|
type AnyDefaultValue = {
|
|
39
160
|
default: ConstValue;
|
|
40
161
|
};
|
|
@@ -44,7 +165,6 @@ type AnyTypeSpecifier = {
|
|
|
44
165
|
readonly kind: string;
|
|
45
166
|
readonly name: string;
|
|
46
167
|
readonly modifier: TypeModifier;
|
|
47
|
-
readonly directives: AnyConstDirectiveAttachments;
|
|
48
168
|
readonly defaultValue?: AnyDefaultValue | null;
|
|
49
169
|
readonly arguments?: InputTypeSpecifiers;
|
|
50
170
|
};
|
|
@@ -52,7 +172,6 @@ type AbstractInputTypeSpecifier<TKind extends InputTypeKind> = {
|
|
|
52
172
|
readonly kind: TKind;
|
|
53
173
|
readonly name: string;
|
|
54
174
|
readonly modifier: TypeModifier;
|
|
55
|
-
readonly directives: AnyConstDirectiveAttachments;
|
|
56
175
|
readonly defaultValue: AnyDefaultValue | null;
|
|
57
176
|
};
|
|
58
177
|
type InputTypeSpecifiers = {
|
|
@@ -67,7 +186,6 @@ type AbstractOutputTypeSpecifier<TKind extends OutputTypeKind> = {
|
|
|
67
186
|
readonly kind: TKind;
|
|
68
187
|
readonly name: string;
|
|
69
188
|
readonly modifier: TypeModifier;
|
|
70
|
-
readonly directives: AnyConstDirectiveAttachments;
|
|
71
189
|
readonly arguments: InputTypeSpecifiers;
|
|
72
190
|
};
|
|
73
191
|
type OutputTypeSpecifiers = {
|
|
@@ -80,42 +198,13 @@ type OutputEnumSpecifier = AbstractOutputTypeSpecifier<"enum">;
|
|
|
80
198
|
type OutputObjectSpecifier = AbstractOutputTypeSpecifier<"object">;
|
|
81
199
|
type OutputUnionSpecifier = AbstractOutputTypeSpecifier<"union">;
|
|
82
200
|
type OutputTypenameSpecifier = AbstractOutputTypeSpecifier<"typename">;
|
|
83
|
-
type StripTailingListFromTypeSpecifier<TTypeSpecifier extends AnyTypeSpecifier> = TTypeSpecifier extends {
|
|
84
|
-
defaultValue: AnyDefaultValue | null;
|
|
85
|
-
} ? {
|
|
86
|
-
readonly kind: TTypeSpecifier["kind"];
|
|
87
|
-
readonly name: TTypeSpecifier["name"];
|
|
88
|
-
readonly modifier: StripTailingListFromTypeModifier<TTypeSpecifier["modifier"]>;
|
|
89
|
-
readonly directives: TTypeSpecifier["directives"];
|
|
90
|
-
readonly defaultValue: TTypeSpecifier["modifier"] extends `${string}${ListTypeModifierSuffix}` ? null : TTypeSpecifier["defaultValue"];
|
|
91
|
-
} : TTypeSpecifier extends {
|
|
92
|
-
arguments: InputTypeSpecifiers;
|
|
93
|
-
} ? {
|
|
94
|
-
readonly kind: TTypeSpecifier["kind"];
|
|
95
|
-
readonly name: TTypeSpecifier["name"];
|
|
96
|
-
readonly modifier: StripTailingListFromTypeModifier<TTypeSpecifier["modifier"]>;
|
|
97
|
-
readonly directives: TTypeSpecifier["directives"];
|
|
98
|
-
readonly arguments: TTypeSpecifier["arguments"];
|
|
99
|
-
} : never;
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region packages/core/src/types/schema/const-assignable-input.d.ts
|
|
102
|
-
type AnyConstAssignableInputValue = ConstValue;
|
|
103
|
-
type AnyConstAssignableInput = {
|
|
104
|
-
readonly [key: string]: AnyConstAssignableInputValue;
|
|
105
|
-
};
|
|
106
|
-
type ConstAssignableInput<TSchema extends AnyGraphqlSchema, TRefs extends InputTypeSpecifiers> = { readonly [K in keyof ApplyTypeModifierToKeys<TRefs>]: ConstAssignableInputValue<TSchema, TRefs[K]> };
|
|
107
|
-
type ConstAssignableInputValue<TSchema extends AnyGraphqlSchema, TRef extends InputTypeSpecifier> = TRef["modifier"] extends `${string}${ListTypeModifierSuffix}` ? ConstAssignableInputValue<TSchema, StripTailingListFromTypeSpecifier<TRef>>[] : (TRef extends InputInputObjectSpecifier ? ConstAssignableInput<TSchema, InputFieldRecord<TSchema, TRef>> : never) | (TRef extends InputInferrableTypeSpecifier ? InferInputTypeRef<TSchema, TRef> : never);
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region packages/core/src/types/schema/const-directives.d.ts
|
|
110
|
-
type AnyConstDirectiveAttachments = {
|
|
111
|
-
readonly [key: string]: AnyConstAssignableInputValue;
|
|
112
|
-
};
|
|
113
201
|
//#endregion
|
|
114
202
|
//#region packages/core/src/types/schema/schema.d.ts
|
|
115
203
|
type OperationType = keyof OperationRoots;
|
|
116
204
|
type AnyTypeName = string;
|
|
117
205
|
type AnyFieldName = string;
|
|
118
206
|
type AnyGraphqlSchema = {
|
|
207
|
+
readonly label: string;
|
|
119
208
|
readonly operations: OperationRoots;
|
|
120
209
|
readonly scalar: {
|
|
121
210
|
readonly [name: string]: ScalarDefinition<any>;
|
|
@@ -138,76 +227,66 @@ type OperationRoots = {
|
|
|
138
227
|
readonly mutation: string | null;
|
|
139
228
|
readonly subscription: string | null;
|
|
140
229
|
};
|
|
141
|
-
|
|
230
|
+
interface ScalarDefinition<T$1 extends {
|
|
231
|
+
name: string;
|
|
142
232
|
input: unknown;
|
|
143
233
|
output: unknown;
|
|
144
|
-
}>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
234
|
+
}> extends WithTypeMeta<{
|
|
235
|
+
input: T$1["input"];
|
|
236
|
+
inputProfile: {
|
|
237
|
+
kind: "scalar";
|
|
238
|
+
name: T$1["name"];
|
|
239
|
+
value: T$1["input"];
|
|
240
|
+
};
|
|
241
|
+
output: T$1["output"];
|
|
242
|
+
outputProfile: {
|
|
243
|
+
kind: "scalar";
|
|
244
|
+
name: T$1["name"];
|
|
245
|
+
value: T$1["output"];
|
|
246
|
+
};
|
|
247
|
+
}> {
|
|
248
|
+
readonly name: T$1["name"];
|
|
249
|
+
}
|
|
250
|
+
interface EnumDefinition<T$1 extends {
|
|
251
|
+
name: string;
|
|
252
|
+
values: string;
|
|
253
|
+
}> extends WithTypeMeta<{
|
|
254
|
+
name: T$1["name"];
|
|
255
|
+
inputProfile: {
|
|
256
|
+
kind: "enum";
|
|
257
|
+
name: T$1["name"];
|
|
258
|
+
value: T$1["values"];
|
|
259
|
+
};
|
|
260
|
+
outputProfile: {
|
|
261
|
+
kind: "enum";
|
|
262
|
+
name: T$1["name"];
|
|
263
|
+
value: T$1["values"];
|
|
264
|
+
};
|
|
265
|
+
}> {
|
|
266
|
+
readonly name: T$1["name"];
|
|
267
|
+
readonly values: { readonly [_ in T$1["values"]]: true };
|
|
268
|
+
}
|
|
269
|
+
interface InputDefinition {
|
|
159
270
|
readonly name: string;
|
|
160
271
|
readonly fields: InputTypeSpecifiers;
|
|
161
|
-
|
|
162
|
-
};
|
|
272
|
+
}
|
|
163
273
|
type ObjectDefinition = {
|
|
164
274
|
readonly name: string;
|
|
165
275
|
readonly fields: OutputTypeSpecifiers;
|
|
166
|
-
readonly directives: AnyConstDirectiveAttachments;
|
|
167
276
|
};
|
|
168
277
|
type UnionDefinition = {
|
|
169
278
|
readonly name: string;
|
|
170
279
|
readonly types: {
|
|
171
280
|
[typename: string]: true;
|
|
172
281
|
};
|
|
173
|
-
readonly directives: AnyConstDirectiveAttachments;
|
|
174
282
|
};
|
|
175
|
-
type
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
type
|
|
179
|
-
type
|
|
180
|
-
type
|
|
181
|
-
type
|
|
182
|
-
type UnionTypeRecord<TSchema extends AnyGraphqlSchema, TSpecifier extends OutputUnionSpecifier> = { readonly [TTypeName in UnionMemberName<TSchema, TSpecifier>]: TSchema["object"][TTypeName] };
|
|
183
|
-
type UnionMemberName<TSchema extends AnyGraphqlSchema, TSpecifier extends OutputUnionSpecifier> = Extract<keyof TSchema["object"], keyof TSchema["union"][TSpecifier["name"]]["types"]> & string;
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region packages/core/src/utils/prettify.d.ts
|
|
186
|
-
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
187
|
-
declare const prettify: <T extends object>(obj: T) => Prettify<T>;
|
|
188
|
-
//#endregion
|
|
189
|
-
//#region packages/core/src/types/fragment/var-ref.d.ts
|
|
190
|
-
/** Nominal reference placeholder used inside `AnyVariableAssignments`. */
|
|
191
|
-
type AnyVarRef = VarRef<any>;
|
|
192
|
-
type AnyVarRefMeta = {
|
|
193
|
-
readonly kind: string;
|
|
194
|
-
readonly name: string;
|
|
195
|
-
readonly modifier: unknown;
|
|
196
|
-
};
|
|
197
|
-
type VarRefBy<TRef extends InputTypeSpecifier> = VarRef<VarRefMetaBy<TRef>>;
|
|
198
|
-
type VarRefMetaBy<TRef extends InputTypeSpecifier> = Prettify<{
|
|
199
|
-
readonly kind: TRef["kind"];
|
|
200
|
-
readonly name: TRef["name"];
|
|
201
|
-
readonly modifier: ApplyTypeModifier<TRef["modifier"], "_"> | (TRef["defaultValue"] extends AnyDefaultValue ? null | undefined : never);
|
|
202
|
-
}>;
|
|
203
|
-
declare const __VAR_REF_BRAND__: unique symbol;
|
|
204
|
-
/** Nominal reference used to defer variable binding while carrying type info. */
|
|
205
|
-
declare class VarRef<TMeta extends AnyVarRefMeta> {
|
|
206
|
-
readonly name: string;
|
|
207
|
-
readonly [__VAR_REF_BRAND__]: Hidden<TMeta>;
|
|
208
|
-
private constructor();
|
|
209
|
-
static create<TRef extends InputTypeSpecifier>(name: string): VarRefBy<TRef>;
|
|
210
|
-
}
|
|
283
|
+
type InferInputProfile<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends InputTypeSpecifier> = { [_ in TSchema["label"]]: [TSpecifier$1 extends InputScalarSpecifier ? [TSchema["scalar"][TSpecifier$1["name"]]["$type"]["inputProfile"]] : TSpecifier$1 extends InputEnumSpecifier ? [TSchema["enum"][TSpecifier$1["name"]]["$type"]["inputProfile"]] : TSchema["input"][TSpecifier$1["name"]]["fields"] extends infer TFields ? { [K in keyof TFields]: TFields[K] extends InputTypeSpecifier ? InferInputProfile<TSchema, TFields[K]> : never } : never, TSpecifier$1["modifier"], TSpecifier$1["defaultValue"] extends AnyDefaultValue ? TypeProfile.WITH_DEFAULT_INPUT : undefined] }[TSchema["label"]];
|
|
284
|
+
type InferOutputProfile<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends OutputInferrableTypeSpecifier> = { [_ in TSchema["label"]]: [(TSpecifier$1 extends OutputScalarSpecifier ? TSchema["scalar"][TSpecifier$1["name"]] : TSchema["enum"][TSpecifier$1["name"]])["$type"]["outputProfile"]] }[TSchema["label"]];
|
|
285
|
+
type PickTypeSpecifierByFieldName<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"], TFieldName$1 extends keyof TSchema["object"][TTypeName$1]["fields"]> = TSchema["object"][TTypeName$1]["fields"][TFieldName$1];
|
|
286
|
+
type InputFieldRecord<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends InputTypeSpecifier> = TSchema["input"][TSpecifier$1["name"]]["fields"];
|
|
287
|
+
type ObjectFieldRecord<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"]> = { readonly [TFieldName in keyof TSchema["object"][TTypeName$1]["fields"]]: TSchema["object"][TTypeName$1]["fields"][TFieldName] };
|
|
288
|
+
type UnionTypeRecord<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends OutputUnionSpecifier> = { readonly [TTypeName in UnionMemberName<TSchema, TSpecifier$1>]: TSchema["object"][TTypeName] };
|
|
289
|
+
type UnionMemberName<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends OutputUnionSpecifier> = Extract<keyof TSchema["object"], keyof TSchema["union"][TSpecifier$1["name"]]["types"]> & string;
|
|
211
290
|
//#endregion
|
|
212
291
|
//#region packages/core/src/types/fragment/assignable-input.d.ts
|
|
213
292
|
type AnyAssignableInputValue = ConstValue | AnyVarRef | {
|
|
@@ -216,15 +295,34 @@ type AnyAssignableInputValue = ConstValue | AnyVarRef | {
|
|
|
216
295
|
type AnyAssignableInput = {
|
|
217
296
|
readonly [key: string]: AnyAssignableInputValue;
|
|
218
297
|
};
|
|
219
|
-
type
|
|
220
|
-
|
|
221
|
-
|
|
298
|
+
type AnyAssigningInput = {
|
|
299
|
+
readonly [key: string]: AnyVarRef;
|
|
300
|
+
};
|
|
301
|
+
type IsOptional$1<TSpecifier$1 extends InputTypeSpecifier> = TSpecifier$1["modifier"] extends `${string}?` ? true : TSpecifier$1["defaultValue"] extends AnyDefaultValue ? true : false;
|
|
302
|
+
type AssignableInput<TSchema extends AnyGraphqlSchema, TSpecifiers extends InputTypeSpecifiers> = { readonly [K in keyof TSpecifiers as IsOptional$1<TSpecifiers[K]> extends true ? K : never]+?: AssignableInputValue<TSchema, TSpecifiers[K]> } & { readonly [K in keyof TSpecifiers as IsOptional$1<TSpecifiers[K]> extends false ? K : never]-?: AssignableInputValue<TSchema, TSpecifiers[K]> };
|
|
303
|
+
type AssignableInputValue<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends InputTypeSpecifier> = GetAssignableType<InferInputProfile<TSchema, TSpecifier$1>>;
|
|
304
|
+
type AssigningInput<TSchema extends AnyGraphqlSchema, TSpecifiers extends InputTypeSpecifiers> = { readonly [K in keyof TSpecifiers]-?: GetAssigningType<InferInputProfile<TSchema, TSpecifiers[K]>> };
|
|
305
|
+
type AssignableInputByFieldName<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"], TFieldName$1 extends keyof TSchema["object"][TTypeName$1]["fields"]> = AssignableInput<TSchema, TSchema["object"][TTypeName$1]["fields"][TFieldName$1]["arguments"]>;
|
|
222
306
|
//#endregion
|
|
223
307
|
//#region packages/core/src/types/fragment/directives.d.ts
|
|
224
308
|
type AnyDirectiveAttachments = {
|
|
225
309
|
readonly [key: string]: AnyAssignableInput;
|
|
226
310
|
};
|
|
227
311
|
//#endregion
|
|
312
|
+
//#region packages/core/src/types/schema/const-assignable-input.d.ts
|
|
313
|
+
type AnyConstAssignableInputValue = ConstValue;
|
|
314
|
+
type AnyConstAssignableInput = {
|
|
315
|
+
readonly [key: string]: AnyConstAssignableInputValue;
|
|
316
|
+
};
|
|
317
|
+
type IsOptional<TSpecifier$1 extends InputTypeSpecifier> = TSpecifier$1["modifier"] extends `${string}?` ? true : TSpecifier$1["defaultValue"] extends AnyDefaultValue ? true : false;
|
|
318
|
+
type ConstAssignableInput<TSchema extends AnyGraphqlSchema, TSpecifiers extends InputTypeSpecifiers> = { readonly [K in keyof TSpecifiers as IsOptional<TSpecifiers[K]> extends true ? K : never]+?: ConstAssignableInputValue<TSchema, TSpecifiers[K]> } & { readonly [K in keyof TSpecifiers as IsOptional<TSpecifiers[K]> extends false ? K : never]-?: ConstAssignableInputValue<TSchema, TSpecifiers[K]> };
|
|
319
|
+
type ConstAssignableInputValue<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends InputTypeSpecifier> = GetConstAssignableType<InferInputProfile<TSchema, TSpecifier$1>> & {};
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region packages/core/src/types/schema/const-directives.d.ts
|
|
322
|
+
type AnyConstDirectiveAttachments = {
|
|
323
|
+
readonly [key: string]: AnyConstAssignableInputValue;
|
|
324
|
+
};
|
|
325
|
+
//#endregion
|
|
228
326
|
//#region packages/core/src/types/fragment/field-selection.d.ts
|
|
229
327
|
/**
|
|
230
328
|
* Canonical representation of the field selections we collect during model and
|
|
@@ -253,16 +351,16 @@ type AnyFields = {
|
|
|
253
351
|
readonly [alias: string]: AnyFieldSelection;
|
|
254
352
|
};
|
|
255
353
|
/** Strongly typed field reference produced for concrete schema members. */
|
|
256
|
-
type AbstractFieldSelection<TTypeName extends AnyTypeName, TFieldName extends AnyFieldName,
|
|
354
|
+
type AbstractFieldSelection<TTypeName$1 extends AnyTypeName, TFieldName$1 extends AnyFieldName, TSpecifier$1 extends OutputTypeSpecifier, TArgs extends AnyAssignableInput, TDirectives extends AnyDirectiveAttachments, TExtras extends {
|
|
257
355
|
object: AnyNestedObject;
|
|
258
356
|
} | {
|
|
259
357
|
union: AnyNestedUnion;
|
|
260
358
|
} | {
|
|
261
359
|
_?: never;
|
|
262
360
|
}> = {
|
|
263
|
-
readonly parent: TTypeName;
|
|
264
|
-
readonly field: TFieldName;
|
|
265
|
-
readonly type:
|
|
361
|
+
readonly parent: TTypeName$1;
|
|
362
|
+
readonly field: TFieldName$1;
|
|
363
|
+
readonly type: TSpecifier$1;
|
|
266
364
|
readonly args: TArgs;
|
|
267
365
|
readonly directives: TDirectives;
|
|
268
366
|
readonly object: TExtras extends {
|
|
@@ -273,23 +371,23 @@ type AbstractFieldSelection<TTypeName extends AnyTypeName, TFieldName extends An
|
|
|
273
371
|
} ? TUnion : null;
|
|
274
372
|
};
|
|
275
373
|
/** Convenience alias to obtain a typed field reference from the schema. */
|
|
276
|
-
type FieldSelectionTemplateOf<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TFieldName extends keyof TSchema["object"][TTypeName]["fields"] & string> = PickTypeSpecifierByFieldName<TSchema, TTypeName, TFieldName> extends infer TRef extends OutputTypeSpecifier ? AbstractFieldSelection<TTypeName, TFieldName, TRef, AssignableInputByFieldName<TSchema, TTypeName, TFieldName>, AnyDirectiveAttachments, (TRef extends OutputObjectSpecifier ? {
|
|
374
|
+
type FieldSelectionTemplateOf<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TFieldName$1 extends keyof TSchema["object"][TTypeName$1]["fields"] & string> = PickTypeSpecifierByFieldName<TSchema, TTypeName$1, TFieldName$1> extends infer TRef extends OutputTypeSpecifier ? AbstractFieldSelection<TTypeName$1, TFieldName$1, TRef, AssignableInputByFieldName<TSchema, TTypeName$1, TFieldName$1>, AnyDirectiveAttachments, (TRef extends OutputObjectSpecifier ? {
|
|
277
375
|
object: AnyNestedObject;
|
|
278
376
|
} : never) | (TRef extends OutputUnionSpecifier ? {
|
|
279
377
|
union: AnyNestedUnion;
|
|
280
378
|
} : never)> : never;
|
|
281
379
|
/** Resolve the data shape produced by a set of field selections. */
|
|
282
|
-
type InferFields<TSchema extends AnyGraphqlSchema, TFields extends AnyFields> =
|
|
380
|
+
type InferFields<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields> = { [_ in TSchema["label"]]: { [TAliasName in keyof TFields$1]: InferField<TSchema, TFields$1[TAliasName]> } & {} }[TSchema["label"]];
|
|
283
381
|
/** Resolve the data shape for a single field reference, including nested objects/unions. */
|
|
284
382
|
type InferField<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection> = (TSelection extends {
|
|
285
|
-
type: infer
|
|
383
|
+
type: infer TSpecifier extends OutputObjectSpecifier;
|
|
286
384
|
object: infer TNested extends AnyNestedObject;
|
|
287
|
-
} ? ApplyTypeModifier<
|
|
288
|
-
type: infer
|
|
385
|
+
} ? ApplyTypeModifier<InferFields<TSchema, TNested>, TSpecifier["modifier"]> : never) | (TSelection extends {
|
|
386
|
+
type: infer TSpecifier extends OutputUnionSpecifier;
|
|
289
387
|
union: infer TNested extends AnyNestedUnion;
|
|
290
|
-
} ? ApplyTypeModifier<
|
|
291
|
-
type: infer
|
|
292
|
-
} ?
|
|
388
|
+
} ? ApplyTypeModifier<{ [TTypename in keyof TNested]: undefined extends TNested[TTypename] ? never : InferFields<TSchema, NonNullable<TNested[TTypename]>> }[keyof TNested], TSpecifier["modifier"]> : never) | (TSelection extends {
|
|
389
|
+
type: infer TSpecifier extends OutputInferrableTypeSpecifier;
|
|
390
|
+
} ? GetModifiedType<InferOutputProfile<TSchema, TSpecifier>, TSpecifier["modifier"]> : never);
|
|
293
391
|
//#endregion
|
|
294
392
|
//#region packages/core/src/types/fragment/field-path.d.ts
|
|
295
393
|
type AnyFieldPath = string;
|
|
@@ -297,29 +395,29 @@ type AnyFieldPath = string;
|
|
|
297
395
|
* Computes strongly typed "$.foo.bar" style selectors for a set of fields so
|
|
298
396
|
* slice result transforms can reference response paths safely.
|
|
299
397
|
*/
|
|
300
|
-
type AvailableFieldPathOf<TSchema extends AnyGraphqlSchema, TFields extends AnyFields> = AvailableFieldPathsInner<TSchema, TFields, "$">;
|
|
398
|
+
type AvailableFieldPathOf<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields> = AvailableFieldPathsInner<TSchema, TFields$1, "$">;
|
|
301
399
|
/** Recursive helper used to build path strings for nested selections. */
|
|
302
|
-
type AvailableFieldPathsInner<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TCurr extends AnyFieldPath> = { readonly [TAliasName in keyof TFields & string]: `${TCurr}.${TAliasName}` | (TFields[TAliasName] extends {
|
|
400
|
+
type AvailableFieldPathsInner<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields, TCurr extends AnyFieldPath> = { readonly [TAliasName in keyof TFields$1 & string]: `${TCurr}.${TAliasName}` | (TFields$1[TAliasName] extends {
|
|
303
401
|
object: infer TNested extends AnyNestedObject;
|
|
304
|
-
} ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields & string];
|
|
402
|
+
} ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields$1 & string];
|
|
305
403
|
/** Resolve the TypeScript type located at a given field path. */
|
|
306
|
-
type InferByFieldPath<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TPath extends AnyFieldPath> = string extends keyof TFields ? any : TPath extends "$" ? never : InferByFieldPathInner<TSchema, TFields, TPath, "$">;
|
|
404
|
+
type InferByFieldPath<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields, TPath extends AnyFieldPath> = string extends keyof TFields$1 ? any : TPath extends "$" ? never : InferByFieldPathInner<TSchema, TFields$1, TPath, "$">;
|
|
307
405
|
/** Internal helper that walks a field tree while matching a path literal. */
|
|
308
|
-
type InferByFieldPathInner<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TPathTarget extends AnyFieldPath, TPathCurrent extends AnyFieldPath> = { readonly [TAliasName in keyof TFields]: TAliasName extends string ? `${TPathCurrent}.${TAliasName}` extends TPathTarget ? InferField<TSchema, TFields[TAliasName]> : TFields[TAliasName] extends {
|
|
406
|
+
type InferByFieldPathInner<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields, TPathTarget extends AnyFieldPath, TPathCurrent extends AnyFieldPath> = { readonly [TAliasName in keyof TFields$1]: TAliasName extends string ? `${TPathCurrent}.${TAliasName}` extends TPathTarget ? InferField<TSchema, TFields$1[TAliasName]> : TFields$1[TAliasName] extends {
|
|
309
407
|
object: infer TNested extends AnyNestedObject;
|
|
310
|
-
} ? InferByFieldPathInner<TSchema, TNested, TPathTarget, `${TPathCurrent}.${TAliasName}`> : never : never }[keyof TFields];
|
|
408
|
+
} ? InferByFieldPathInner<TSchema, TNested, TPathTarget, `${TPathCurrent}.${TAliasName}`> : never : never }[keyof TFields$1];
|
|
311
409
|
//#endregion
|
|
312
410
|
//#region packages/core/src/composer/build-document.d.ts
|
|
313
411
|
declare const buildArgumentValue: (value: AnyAssignableInputValue) => ValueNode | null;
|
|
314
412
|
declare const buildConstValueNode: (value: ConstValue) => ConstValueNode | null;
|
|
315
413
|
declare const buildWithTypeModifier: (modifier: TypeModifier, buildType: () => NamedTypeNode) => TypeNode;
|
|
316
414
|
declare const buildOperationTypeNode: (operation: OperationType) => OperationTypeNode;
|
|
317
|
-
declare const buildDocument: <TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TVarDefinitions extends InputTypeSpecifiers>(options: {
|
|
415
|
+
declare const buildDocument: <TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields, TVarDefinitions extends InputTypeSpecifiers>(options: {
|
|
318
416
|
operationName: string;
|
|
319
417
|
operationType: OperationType;
|
|
320
418
|
variables: TVarDefinitions;
|
|
321
|
-
fields: TFields;
|
|
322
|
-
}) => TypedDocumentNode<InferFields<TSchema, TFields>, ConstAssignableInput<TSchema, TVarDefinitions>>;
|
|
419
|
+
fields: TFields$1;
|
|
420
|
+
}) => TypedDocumentNode<InferFields<TSchema, TFields$1>, ConstAssignableInput<TSchema, TVarDefinitions>>;
|
|
323
421
|
//#endregion
|
|
324
422
|
//#region packages/core/src/types/element/gql-element.d.ts
|
|
325
423
|
declare const GQL_ELEMENT_FACTORY: unique symbol;
|
|
@@ -327,7 +425,7 @@ declare const GQL_ELEMENT_CONTEXT: unique symbol;
|
|
|
327
425
|
type GqlElementContext = {
|
|
328
426
|
canonicalId: string;
|
|
329
427
|
};
|
|
330
|
-
type GqlElementDefinitionFactory<T> = (context: GqlElementContext | null) => T;
|
|
428
|
+
type GqlElementDefinitionFactory<T$1> = (context: GqlElementContext | null) => T$1;
|
|
331
429
|
declare abstract class GqlElement<TDefinition> {
|
|
332
430
|
private [GQL_ELEMENT_FACTORY];
|
|
333
431
|
private [GQL_ELEMENT_CONTEXT];
|
|
@@ -337,11 +435,15 @@ declare abstract class GqlElement<TDefinition> {
|
|
|
337
435
|
static get<TValue>(element: GqlElement<TValue>): TValue;
|
|
338
436
|
}
|
|
339
437
|
//#endregion
|
|
438
|
+
//#region packages/core/src/utils/hidden.d.ts
|
|
439
|
+
declare const hidden: <T$1>() => (() => T$1);
|
|
440
|
+
type Hidden<T$1> = () => T$1;
|
|
441
|
+
//#endregion
|
|
340
442
|
//#region packages/core/src/utils/type-utils.d.ts
|
|
341
443
|
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
|
|
342
|
-
type Tuple<T> = [T, ...T[]];
|
|
343
|
-
type StripFunctions<T extends object> = { [K in keyof T as T[K] extends ((...args: any[]) => any) ? never : K]: T[K] };
|
|
344
|
-
type StripSymbols<T extends object> = { [K in keyof T as K extends symbol ? never : K]: T[K] };
|
|
444
|
+
type Tuple<T$1> = [T$1, ...T$1[]];
|
|
445
|
+
type StripFunctions<T$1 extends object> = { [K in keyof T$1 as T$1[K] extends ((...args: any[]) => any) ? never : K]: T$1[K] };
|
|
446
|
+
type StripSymbols<T$1 extends object> = { [K in keyof T$1 as K extends symbol ? never : K]: T$1[K] };
|
|
345
447
|
//#endregion
|
|
346
448
|
//#region packages/core/src/types/runtime/runtime-adapter.d.ts
|
|
347
449
|
/**
|
|
@@ -469,7 +571,7 @@ declare const __EMPTY_SYMBOL__: unique symbol;
|
|
|
469
571
|
type EmptyObject = {
|
|
470
572
|
readonly [__EMPTY_SYMBOL__]: never;
|
|
471
573
|
};
|
|
472
|
-
type IsEmptyObject<T> = keyof (T & EmptyObject) extends keyof EmptyObject ? true : false;
|
|
574
|
+
type IsEmptyObject<T$1> = keyof (T$1 & EmptyObject) extends keyof EmptyObject ? true : false;
|
|
473
575
|
type IfEmpty<TTarget, TType> = IsEmptyObject<TTarget> extends true ? TType : never;
|
|
474
576
|
type SwitchIfEmpty<TTarget, TTrue, TFalse> = IsEmptyObject<TTarget> extends true ? TTrue : TFalse;
|
|
475
577
|
declare const empty: () => EmptyObject;
|
|
@@ -477,23 +579,23 @@ declare const empty: () => EmptyObject;
|
|
|
477
579
|
//#region packages/core/src/types/element/slice.d.ts
|
|
478
580
|
type AnySlice = AnySliceOf<"query"> | AnySliceOf<"mutation"> | AnySliceOf<"subscription">;
|
|
479
581
|
type AnySliceOf<TOperationType extends OperationType> = Slice<TOperationType, any, AnyFields, AnyProjection>;
|
|
480
|
-
type SliceDefinition<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TProjection extends AnyProjection> = {
|
|
582
|
+
type SliceDefinition<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> = {
|
|
481
583
|
readonly operationType: TOperationType;
|
|
482
|
-
readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields, TProjection>;
|
|
584
|
+
readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
|
|
483
585
|
};
|
|
484
586
|
declare const __OPERATION_SLICE_BRAND__: unique symbol;
|
|
485
|
-
declare class Slice<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TProjection extends AnyProjection> extends GqlElement<SliceDefinition<TOperationType, TVariables, TFields, TProjection>> implements SliceDefinition<TOperationType, TVariables, TFields, TProjection> {
|
|
587
|
+
declare class Slice<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> extends GqlElement<SliceDefinition<TOperationType, TVariables, TFields$1, TProjection>> implements SliceDefinition<TOperationType, TVariables, TFields$1, TProjection> {
|
|
486
588
|
readonly [__OPERATION_SLICE_BRAND__]: Hidden<{
|
|
487
589
|
operationType: TOperationType;
|
|
488
590
|
output: InferExecutionResultProjection<TProjection>;
|
|
489
591
|
}>;
|
|
490
592
|
private constructor();
|
|
491
593
|
get operationType(): TOperationType;
|
|
492
|
-
get embed(): (variables: TVariables) => SlicePayload<TVariables, TFields, TProjection>;
|
|
493
|
-
static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields, TProjection extends AnyProjection>(define: () => {
|
|
594
|
+
get embed(): (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
|
|
595
|
+
static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields, TProjection extends AnyProjection>(define: () => {
|
|
494
596
|
operationType: TOperationType;
|
|
495
|
-
embed: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => SlicePayload<SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields, TProjection>;
|
|
496
|
-
}): Slice<TOperationType, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields & {
|
|
597
|
+
embed: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => SlicePayload<SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1, TProjection>;
|
|
598
|
+
}): Slice<TOperationType, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1 & {
|
|
497
599
|
[key: symbol]: never;
|
|
498
600
|
}, TProjection>;
|
|
499
601
|
}
|
|
@@ -501,9 +603,9 @@ type AnySlicePayloads = {
|
|
|
501
603
|
[key: string]: AnySlicePayload;
|
|
502
604
|
};
|
|
503
605
|
type AnySlicePayload = SlicePayload<AnyAssignableInput | void, AnyFields, AnyProjection>;
|
|
504
|
-
type SlicePayload<TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TProjection extends AnyProjection> = {
|
|
606
|
+
type SlicePayload<TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> = {
|
|
505
607
|
variables: TVariables;
|
|
506
|
-
getFields: () => TFields;
|
|
608
|
+
getFields: () => TFields$1;
|
|
507
609
|
projection: TProjection;
|
|
508
610
|
};
|
|
509
611
|
type InferOutputOfSlice<TSlice extends AnySliceOf<any>> = ReturnType<TSlice[typeof __OPERATION_SLICE_BRAND__]>["output"];
|
|
@@ -538,7 +640,7 @@ declare class ComposedOperation<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter
|
|
|
538
640
|
projectionPathGraph: ProjectionPathGraphNode;
|
|
539
641
|
document: TypedDocumentNode<InferComposedOperationRawData<TSchema, TSliceFragments>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
|
|
540
642
|
parse: (result: NormalizedExecutionResult<TRuntimeAdapter, InferComposedOperationRawData<TSchema, TSliceFragments>, any>) => { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> };
|
|
541
|
-
}): ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>,
|
|
643
|
+
}): ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> }>;
|
|
542
644
|
}
|
|
543
645
|
type ProjectionPathGraphNode = {
|
|
544
646
|
readonly matches: {
|
|
@@ -550,21 +652,21 @@ type ProjectionPathGraphNode = {
|
|
|
550
652
|
readonly [segment: string]: ProjectionPathGraphNode;
|
|
551
653
|
};
|
|
552
654
|
};
|
|
553
|
-
type ConcatSlicePayloads<TSlicePayloads extends AnySlicePayloads> =
|
|
655
|
+
type ConcatSlicePayloads<TSlicePayloads extends AnySlicePayloads> = UnionToIntersection<{ [TLabel in keyof TSlicePayloads & string]: TSlicePayloads[TLabel] extends {
|
|
554
656
|
getFields: () => infer TFields;
|
|
555
|
-
} ? { [K in keyof TFields & string as `${TLabel}_${K}`]: TFields[K] } : {} }[keyof TSlicePayloads & string]
|
|
556
|
-
type InferComposedOperationRawData<TSchema extends AnyGraphqlSchema, TSlicePayloads extends AnySlicePayloads> =
|
|
657
|
+
} ? { [K in keyof TFields & string as `${TLabel}_${K}`]: TFields[K] } : {} }[keyof TSlicePayloads & string]> & AnyFields;
|
|
658
|
+
type InferComposedOperationRawData<TSchema extends AnyGraphqlSchema, TSlicePayloads extends AnySlicePayloads> = InferFields<TSchema, ConcatSlicePayloads<TSlicePayloads>>;
|
|
557
659
|
type ComposedOperationDefinitionBuilder<TSchema extends AnyGraphqlSchema, TVarDefinitions extends InputTypeSpecifiers, TSliceContents extends AnySlicePayloads> = (tools: {
|
|
558
|
-
$: NoInfer<
|
|
660
|
+
$: NoInfer<AssigningInput<TSchema, TVarDefinitions>>;
|
|
559
661
|
}) => TSliceContents;
|
|
560
662
|
//#endregion
|
|
561
663
|
//#region packages/core/src/types/element/execution-result-projection-builder.d.ts
|
|
562
664
|
type AnyExecutionResultProjectionsBuilder = ExecutionResultProjectionsBuilder<AnyGraphqlSchema, AnyGraphqlRuntimeAdapter, any, any>;
|
|
563
|
-
type ExecutionResultProjectionsBuilder<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields extends AnyFields, TProjection extends AnyProjection> = (tools: {
|
|
564
|
-
select: ResultSelector<TSchema, TRuntimeAdapter, TFields>;
|
|
665
|
+
type ExecutionResultProjectionsBuilder<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields$1 extends AnyFields, TProjection extends AnyProjection> = (tools: {
|
|
666
|
+
select: ResultSelector<TSchema, TRuntimeAdapter, TFields$1>;
|
|
565
667
|
}) => TProjection;
|
|
566
|
-
type ResultSelector<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields extends AnyFields> = <TPaths extends Tuple<AvailableFieldPathOf<TSchema, TFields>>, TProjected>(paths: TPaths, projector: (result: NoInfer<SlicedExecutionResult<InferByResultSelectorPaths<TSchema, TFields, TPaths>, TRuntimeAdapter>>) => TProjected) => NoInfer<Projection<TProjected>>;
|
|
567
|
-
type InferByResultSelectorPaths<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TPaths extends Tuple<AvailableFieldPathOf<TSchema, TFields>>> = TPaths extends string[] ? { [K in keyof TPaths]: TPaths[K] extends string ? InferByFieldPath<TSchema, TFields, TPaths[K]> : never } : never;
|
|
668
|
+
type ResultSelector<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields$1 extends AnyFields> = <TPaths extends Tuple<AvailableFieldPathOf<TSchema, TFields$1>>, TProjected>(paths: TPaths, projector: (result: NoInfer<SlicedExecutionResult<InferByResultSelectorPaths<TSchema, TFields$1, TPaths>, TRuntimeAdapter>>) => TProjected) => NoInfer<Projection<TProjected>>;
|
|
669
|
+
type InferByResultSelectorPaths<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields, TPaths extends Tuple<AvailableFieldPathOf<TSchema, TFields$1>>> = TPaths extends string[] ? { [K in keyof TPaths]: TPaths[K] extends string ? InferByFieldPath<TSchema, TFields$1, TPaths[K]> : never } : never;
|
|
568
670
|
//#endregion
|
|
569
671
|
//#region packages/core/src/types/element/fields-builder.d.ts
|
|
570
672
|
declare const mergeFields: <TFieldEntries extends AnyFields[]>(fields: TFieldEntries) => MergeFields<TFieldEntries>;
|
|
@@ -574,19 +676,19 @@ type MergeFields<TFieldEntries extends AnyFields[]> = UnionToIntersection<TField
|
|
|
574
676
|
* tooling `f`/`fields`/`_` aliases provide ergonomic access to GraphQL fields
|
|
575
677
|
* while preserving the original schema information for inference.
|
|
576
678
|
*/
|
|
577
|
-
type FieldsBuilder<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields[]> = (tools: NoInfer<FieldsBuilderTools<TSchema, TTypeName, TVariableDefinitions>>) => TFields;
|
|
578
|
-
type FieldsBuilderTools<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers> = {
|
|
579
|
-
f: FieldSelectionFactories<TSchema, TTypeName>;
|
|
580
|
-
$:
|
|
679
|
+
type FieldsBuilder<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields[]> = (tools: NoInfer<FieldsBuilderTools<TSchema, TTypeName$1, TVariableDefinitions>>) => TFields$1;
|
|
680
|
+
type FieldsBuilderTools<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers> = {
|
|
681
|
+
f: FieldSelectionFactories<TSchema, TTypeName$1>;
|
|
682
|
+
$: AssigningInput<TSchema, TVariableDefinitions>;
|
|
581
683
|
};
|
|
582
684
|
/** Narrow builder used when a field resolves to an object and we need nested selections. */
|
|
583
|
-
type NestedObjectFieldsBuilder<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TFields extends AnyNestedObject[]> = (tools: NoInfer<NestedObjectFieldsBuilderTools<TSchema, TTypeName>>) => TFields;
|
|
584
|
-
type NestedObjectFieldsBuilderTools<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string> = {
|
|
585
|
-
f: FieldSelectionFactories<TSchema, TTypeName>;
|
|
685
|
+
type NestedObjectFieldsBuilder<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TFields$1 extends AnyNestedObject[]> = (tools: NoInfer<NestedObjectFieldsBuilderTools<TSchema, TTypeName$1>>) => TFields$1;
|
|
686
|
+
type NestedObjectFieldsBuilderTools<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string> = {
|
|
687
|
+
f: FieldSelectionFactories<TSchema, TTypeName$1>;
|
|
586
688
|
};
|
|
587
689
|
type NestedUnionFieldsBuilder<TSchema extends AnyGraphqlSchema, TMemberName extends string, TUnionFields extends AnyNestedUnion> = { [TTypename in keyof TUnionFields & TMemberName]?: NestedObjectFieldsBuilder<TSchema, TTypename, NonNullable<TUnionFields[TTypename]>[]> };
|
|
588
690
|
/** Map each field to a factory capable of emitting fully-typed references. */
|
|
589
|
-
type FieldSelectionFactories<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string> = { [TFieldName in keyof ObjectFieldRecord<TSchema, TTypeName>]: TFieldName extends string ? FieldSelectionFactory<TSchema, FieldSelectionTemplateOf<TSchema, TTypeName, TFieldName>> : never };
|
|
691
|
+
type FieldSelectionFactories<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string> = { [TFieldName in keyof ObjectFieldRecord<TSchema, TTypeName$1>]: TFieldName extends string ? FieldSelectionFactory<TSchema, FieldSelectionTemplateOf<TSchema, TTypeName$1, TFieldName>> : never };
|
|
590
692
|
type AnyFieldSelectionFactory = <TAlias extends string | null = null>(fieldArgs: AnyAssignableInput | void, extras?: {
|
|
591
693
|
alias?: TAlias;
|
|
592
694
|
directives?: AnyDirectiveAttachments;
|
|
@@ -611,13 +713,13 @@ type FieldSelectionFactoryReturn<TSchema extends AnyGraphqlSchema, TSelection ex
|
|
|
611
713
|
} ? FieldSelectionFactoryPrimitiveReturn<TSelection, TAlias> : never;
|
|
612
714
|
type FieldSelectionFactoryObjectReturn<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection & {
|
|
613
715
|
type: OutputObjectSpecifier;
|
|
614
|
-
}, TAlias extends string | null> = <TNested extends AnyNestedObject[]>(nest: NestedObjectFieldsBuilder<TSchema, TSelection["type"]["name"], TNested>) => { [_ in TAlias extends null ? TSelection["field"] : TAlias]: AbstractFieldSelection<TSelection["parent"], TSelection["field"], TSelection["type"], TSelection["args"], TSelection["directives"], {
|
|
615
|
-
object: MergeFields<TNested>;
|
|
716
|
+
}, TAlias extends string | null> = <TNested$1 extends AnyNestedObject[]>(nest: NestedObjectFieldsBuilder<TSchema, TSelection["type"]["name"], TNested$1>) => { [_ in TAlias extends null ? TSelection["field"] : TAlias]: AbstractFieldSelection<TSelection["parent"], TSelection["field"], TSelection["type"], TSelection["args"], TSelection["directives"], {
|
|
717
|
+
object: MergeFields<TNested$1>;
|
|
616
718
|
}> };
|
|
617
719
|
type FieldSelectionFactoryUnionReturn<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection & {
|
|
618
720
|
type: OutputUnionSpecifier;
|
|
619
|
-
}, TAlias extends string | null> = <TNested extends AnyNestedUnion>(nest: NestedUnionFieldsBuilder<TSchema, UnionMemberName<TSchema, TSelection["type"]>, TNested>) => { [_ in TAlias extends null ? TSelection["field"] : TAlias]: AbstractFieldSelection<TSelection["parent"], TSelection["field"], TSelection["type"], TSelection["args"], TSelection["directives"], {
|
|
620
|
-
union: TNested;
|
|
721
|
+
}, TAlias extends string | null> = <TNested$1 extends AnyNestedUnion>(nest: NestedUnionFieldsBuilder<TSchema, UnionMemberName<TSchema, TSelection["type"]>, TNested$1>) => { [_ in TAlias extends null ? TSelection["field"] : TAlias]: AbstractFieldSelection<TSelection["parent"], TSelection["field"], TSelection["type"], TSelection["args"], TSelection["directives"], {
|
|
722
|
+
union: TNested$1;
|
|
621
723
|
}> };
|
|
622
724
|
type FieldSelectionFactoryPrimitiveReturn<TSelection extends AnyFieldSelection & {
|
|
623
725
|
type: OutputTypenameSpecifier | OutputScalarSpecifier | OutputEnumSpecifier;
|
|
@@ -628,14 +730,14 @@ type FieldSelectionFactoryFieldArguments<TFieldSelectionTemplate extends AnyFiel
|
|
|
628
730
|
type AnyInlineOperation = AnyInlineOperationOf<"query"> | AnyInlineOperationOf<"mutation"> | AnyInlineOperationOf<"subscription">;
|
|
629
731
|
type AnyInlineOperationOf<TOperationType extends OperationType> = InlineOperation<TOperationType, string, string[], any, AnyFields, any>;
|
|
630
732
|
declare const __INLINE_OPERATION_BRAND__: unique symbol;
|
|
631
|
-
type InlineOperationArtifact<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields extends Partial<AnyFields>, TData extends object> = {
|
|
733
|
+
type InlineOperationArtifact<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields$1 extends Partial<AnyFields>, TData extends object> = {
|
|
632
734
|
readonly operationType: TOperationType;
|
|
633
735
|
readonly operationName: TOperationName;
|
|
634
736
|
readonly variableNames: TVariableNames;
|
|
635
|
-
readonly documentSource: () => TFields;
|
|
737
|
+
readonly documentSource: () => TFields$1;
|
|
636
738
|
readonly document: TypedDocumentNode<TData, TVariables>;
|
|
637
739
|
};
|
|
638
|
-
declare class InlineOperation<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields extends Partial<AnyFields>, TData extends object> extends GqlElement<InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields, TData>> implements InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields, TData> {
|
|
740
|
+
declare class InlineOperation<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields$1 extends Partial<AnyFields>, TData extends object> extends GqlElement<InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields$1, TData>> implements InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields$1, TData> {
|
|
639
741
|
readonly [__INLINE_OPERATION_BRAND__]: Hidden<{
|
|
640
742
|
operationType: TOperationType;
|
|
641
743
|
}>;
|
|
@@ -643,68 +745,68 @@ declare class InlineOperation<TOperationType extends OperationType, TOperationNa
|
|
|
643
745
|
get operationType(): TOperationType;
|
|
644
746
|
get operationName(): TOperationName;
|
|
645
747
|
get variableNames(): TVariableNames;
|
|
646
|
-
get documentSource(): () => TFields;
|
|
748
|
+
get documentSource(): () => TFields$1;
|
|
647
749
|
get document(): TypedDocumentNode<TData, TVariables>;
|
|
648
|
-
static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields>(define: (context: GqlElementContext | null) => {
|
|
750
|
+
static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields>(define: (context: GqlElementContext | null) => {
|
|
649
751
|
operationType: TOperationType;
|
|
650
752
|
operationName: TOperationName;
|
|
651
753
|
variableNames: (keyof TVariableDefinitions & string)[];
|
|
652
|
-
documentSource: () => TFields;
|
|
653
|
-
document: TypedDocumentNode<InferFields<TSchema, TFields>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
|
|
654
|
-
}): InlineOperation<TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, TFields,
|
|
754
|
+
documentSource: () => TFields$1;
|
|
755
|
+
document: TypedDocumentNode<InferFields<TSchema, TFields$1>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
|
|
756
|
+
}): InlineOperation<TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, TFields$1, InferFields<TSchema, TFields$1>>;
|
|
655
757
|
}
|
|
656
758
|
//#endregion
|
|
657
759
|
//#region packages/core/src/types/element/model.d.ts
|
|
658
760
|
type AnyModel = Model<string, any, AnyFields, any, any>;
|
|
659
|
-
|
|
660
|
-
readonly typename: TTypeName;
|
|
661
|
-
readonly fragment: (variables: TVariables) => TFields;
|
|
761
|
+
interface ModelArtifact<TTypeName$1 extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> {
|
|
762
|
+
readonly typename: TTypeName$1;
|
|
763
|
+
readonly fragment: (variables: TVariables) => TFields$1;
|
|
662
764
|
readonly normalize: (raw: TRaw) => TNormalized;
|
|
663
|
-
}
|
|
765
|
+
}
|
|
664
766
|
declare const __MODEL_BRAND__: unique symbol;
|
|
665
|
-
declare class Model<TTypeName extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> extends GqlElement<ModelArtifact<TTypeName, TVariables, TFields, TRaw, TNormalized>> implements ModelArtifact<TTypeName, TVariables, TFields, TRaw, TNormalized> {
|
|
767
|
+
declare class Model<TTypeName$1 extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> extends GqlElement<ModelArtifact<TTypeName$1, TVariables, TFields$1, TRaw, TNormalized>> implements ModelArtifact<TTypeName$1, TVariables, TFields$1, TRaw, TNormalized> {
|
|
666
768
|
readonly [__MODEL_BRAND__]: Hidden<{
|
|
667
769
|
input: TVariables;
|
|
668
770
|
output: TNormalized;
|
|
669
771
|
}>;
|
|
670
772
|
private constructor();
|
|
671
|
-
get typename(): TTypeName;
|
|
672
|
-
get fragment(): (variables: TVariables) => TFields;
|
|
773
|
+
get typename(): TTypeName$1;
|
|
774
|
+
get fragment(): (variables: TVariables) => TFields$1;
|
|
673
775
|
get normalize(): (raw: TRaw) => TNormalized;
|
|
674
|
-
static create<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields, TNormalized extends object>(define: () => {
|
|
675
|
-
typename: TTypeName;
|
|
676
|
-
fragment: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => TFields;
|
|
677
|
-
normalize: (raw: NoInfer<InferFields<TSchema, TFields>>) => TNormalized;
|
|
678
|
-
}): Model<TTypeName, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields & {
|
|
776
|
+
static create<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields, TNormalized extends object>(define: () => {
|
|
777
|
+
typename: TTypeName$1;
|
|
778
|
+
fragment: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => TFields$1;
|
|
779
|
+
normalize: (raw: NoInfer<InferFields<TSchema, TFields$1>>) => TNormalized;
|
|
780
|
+
}): Model<TTypeName$1, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1 & {
|
|
679
781
|
[key: symbol]: never;
|
|
680
|
-
},
|
|
782
|
+
}, InferFields<TSchema, TFields$1> & {
|
|
681
783
|
[key: symbol]: never;
|
|
682
784
|
}, TNormalized>;
|
|
683
785
|
}
|
|
684
786
|
//#endregion
|
|
685
787
|
//#region packages/core/src/composer/input.d.ts
|
|
686
788
|
declare const mergeVarDefinitions: <TVarDefinitions extends InputTypeSpecifiers[]>(definitions: TVarDefinitions) => MergeVarDefinitions<TVarDefinitions>;
|
|
687
|
-
type MergeVarDefinitions<TVarDefinitions extends InputTypeSpecifiers[]> = UnionToIntersection<TVarDefinitions[number]> extends infer TDefinitions ? { readonly [K in keyof TDefinitions]: TDefinitions[K] }
|
|
688
|
-
declare const createVarAssignments: <TSchema extends AnyGraphqlSchema, TVariableDefinitions extends InputTypeSpecifiers>(definitions: TVariableDefinitions,
|
|
689
|
-
declare const createVarRefs: <TSchema extends AnyGraphqlSchema, TVarDefinitions extends InputTypeSpecifiers>(definitions: TVarDefinitions) =>
|
|
789
|
+
type MergeVarDefinitions<TVarDefinitions extends InputTypeSpecifiers[]> = UnionToIntersection<TVarDefinitions[number]> extends infer TDefinitions ? { readonly [K in keyof TDefinitions]: TDefinitions[K] } : never;
|
|
790
|
+
declare const createVarAssignments: <TSchema extends AnyGraphqlSchema, TVariableDefinitions extends InputTypeSpecifiers>(definitions: TVariableDefinitions, providedValues: AnyAssignableInput | void) => AssigningInput<TSchema, TVariableDefinitions>;
|
|
791
|
+
declare const createVarRefs: <TSchema extends AnyGraphqlSchema, TVarDefinitions extends InputTypeSpecifiers>(definitions: TVarDefinitions) => AssigningInput<TSchema, TVarDefinitions>;
|
|
690
792
|
//#endregion
|
|
691
793
|
//#region packages/core/src/composer/composed-operation.d.ts
|
|
692
794
|
declare const createComposedOperationComposerFactory: <TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>() => <TOperationType extends OperationType>(operationType: TOperationType) => <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
693
795
|
operationName: TOperationName;
|
|
694
796
|
variables?: TVarDefinitions;
|
|
695
|
-
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof MergeVarDefinitions<TVarDefinitions> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions>>,
|
|
797
|
+
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof MergeVarDefinitions<TVarDefinitions> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions>>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: ReturnType<TSliceFragments[K]["projection"]["projector"]> }>;
|
|
696
798
|
//#endregion
|
|
697
799
|
//#region packages/core/src/composer/fields-builder.d.ts
|
|
698
|
-
declare const createFieldFactories: <TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string>(schema: TSchema, typeName: TTypeName) => FieldSelectionFactories<TSchema, TTypeName>;
|
|
800
|
+
declare const createFieldFactories: <TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string>(schema: TSchema, typeName: TTypeName$1) => FieldSelectionFactories<TSchema, TTypeName$1>;
|
|
699
801
|
//#endregion
|
|
700
802
|
//#region packages/core/src/composer/gql-composer.d.ts
|
|
701
803
|
type GqlElementComposer<TComposers, THelper> = <TResult extends AnyModel | AnySlice | AnyComposedOperation | AnyInlineOperation>(composeElement: (composers: TComposers, helper: THelper) => TResult) => TResult;
|
|
702
804
|
declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>(schema: NoInfer<TSchema>) => GqlElementComposer<{
|
|
703
805
|
model: Omit<{ readonly [TTypeName in keyof TSchema["object"]]: TTypeName extends string ? <TFieldEntries extends AnyFields[], TNormalized extends object, TVarDefinitions extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
704
806
|
variables?: TVarDefinitions | undefined;
|
|
705
|
-
}, builder: FieldsBuilder<TSchema, TTypeName, MergeVarDefinitions<TVarDefinitions>, TFieldEntries>, normalize: (raw: NoInfer<
|
|
807
|
+
}, builder: FieldsBuilder<TSchema, TTypeName, MergeVarDefinitions<TVarDefinitions>, TFieldEntries>, normalize: (raw: NoInfer<InferFields<TSchema, MergeFields<TFieldEntries>>>) => TNormalized) => Model<TTypeName, SwitchIfEmpty<MergeVarDefinitions<TVarDefinitions>, void, AssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions>>>, MergeFields<TFieldEntries> & {
|
|
706
808
|
[key: symbol]: never;
|
|
707
|
-
},
|
|
809
|
+
}, InferFields<TSchema, MergeFields<TFieldEntries>> & {
|
|
708
810
|
[key: symbol]: never;
|
|
709
811
|
}, TNormalized> : never }, TSchema["operations"][keyof OperationRoots] & keyof TSchema["object"]>;
|
|
710
812
|
query: {
|
|
@@ -716,11 +818,11 @@ declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRunt
|
|
|
716
818
|
composed: <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions_2 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
717
819
|
operationName: TOperationName;
|
|
718
820
|
variables?: TVarDefinitions_2 | undefined;
|
|
719
|
-
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions_2>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, "query", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_2> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_2>>,
|
|
720
|
-
inline: <TOperationName extends string, TFields extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
821
|
+
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions_2>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, "query", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_2> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_2>>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: ReturnType<TSliceFragments[K]["projection"]["projector"]> }>;
|
|
822
|
+
inline: <TOperationName extends string, TFields$1 extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
721
823
|
operationName: TOperationName;
|
|
722
824
|
variables?: TVarDefinitions_3 | undefined;
|
|
723
|
-
}, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["query"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_3>, TFields>) => InlineOperation<"query", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_3> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_3>>, MergeFields<TFields>,
|
|
825
|
+
}, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["query"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_3>, TFields$1>) => InlineOperation<"query", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_3> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_3>>, MergeFields<TFields$1>, InferFields<TSchema, MergeFields<TFields$1>>>;
|
|
724
826
|
};
|
|
725
827
|
mutation: {
|
|
726
828
|
slice: <TFieldEntries extends AnyFields[], TProjection extends AnyProjection, TVarDefinitions_1 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
@@ -731,11 +833,11 @@ declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRunt
|
|
|
731
833
|
composed: <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions_2 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
732
834
|
operationName: TOperationName;
|
|
733
835
|
variables?: TVarDefinitions_2 | undefined;
|
|
734
|
-
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions_2>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, "mutation", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_2> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_2>>,
|
|
735
|
-
inline: <TOperationName extends string, TFields extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
836
|
+
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions_2>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, "mutation", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_2> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_2>>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: ReturnType<TSliceFragments[K]["projection"]["projector"]> }>;
|
|
837
|
+
inline: <TOperationName extends string, TFields$1 extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
736
838
|
operationName: TOperationName;
|
|
737
839
|
variables?: TVarDefinitions_3 | undefined;
|
|
738
|
-
}, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["mutation"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_3>, TFields>) => InlineOperation<"mutation", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_3> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_3>>, MergeFields<TFields>,
|
|
840
|
+
}, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["mutation"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_3>, TFields$1>) => InlineOperation<"mutation", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_3> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_3>>, MergeFields<TFields$1>, InferFields<TSchema, MergeFields<TFields$1>>>;
|
|
739
841
|
};
|
|
740
842
|
subscription: {
|
|
741
843
|
slice: <TFieldEntries extends AnyFields[], TProjection extends AnyProjection, TVarDefinitions_1 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
@@ -746,34 +848,34 @@ declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRunt
|
|
|
746
848
|
composed: <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions_2 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
747
849
|
operationName: TOperationName;
|
|
748
850
|
variables?: TVarDefinitions_2 | undefined;
|
|
749
|
-
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions_2>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, "subscription", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_2> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_2>>,
|
|
750
|
-
inline: <TOperationName extends string, TFields extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
851
|
+
}, builder: ComposedOperationDefinitionBuilder<TSchema, MergeVarDefinitions<TVarDefinitions_2>, TSliceFragments>) => ComposedOperation<TRuntimeAdapter, "subscription", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_2> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_2>>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: ReturnType<TSliceFragments[K]["projection"]["projector"]> }>;
|
|
852
|
+
inline: <TOperationName extends string, TFields$1 extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
751
853
|
operationName: TOperationName;
|
|
752
854
|
variables?: TVarDefinitions_3 | undefined;
|
|
753
|
-
}, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["subscription"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_3>, TFields>) => InlineOperation<"subscription", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_3> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_3>>, MergeFields<TFields>,
|
|
855
|
+
}, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["subscription"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_3>, TFields$1>) => InlineOperation<"subscription", TOperationName, (keyof MergeVarDefinitions<TVarDefinitions_3> & string)[], ConstAssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_3>>, MergeFields<TFields$1>, InferFields<TSchema, MergeFields<TFields$1>>>;
|
|
754
856
|
};
|
|
755
857
|
}, {
|
|
756
858
|
$: <TVarName extends string>(varName: TVarName) => {
|
|
757
|
-
scalar: <const TTypeName_1 extends keyof TSchema["scalar"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() =>
|
|
859
|
+
scalar: <const TTypeName_1 extends keyof TSchema["scalar"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
758
860
|
kind: "scalar";
|
|
759
861
|
name: TTypeName_1;
|
|
760
862
|
modifier: TModifier;
|
|
761
863
|
directives: {};
|
|
762
864
|
defaultValue: null;
|
|
763
|
-
}
|
|
764
|
-
default?: (TDefaultFn & (() =>
|
|
865
|
+
}>> & {}) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["scalar"] & string], TTypeName_1, TModifier>, extras?: {
|
|
866
|
+
default?: (TDefaultFn & (() => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
765
867
|
kind: "scalar";
|
|
766
868
|
name: TTypeName_1;
|
|
767
869
|
modifier: TModifier;
|
|
768
870
|
directives: {};
|
|
769
871
|
defaultValue: null;
|
|
770
|
-
}
|
|
872
|
+
}>> & {})) | (NoInfer<TDefaultFn> extends null ? () => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
771
873
|
kind: "scalar";
|
|
772
874
|
name: TTypeName_1;
|
|
773
875
|
modifier: TModifier;
|
|
774
876
|
directives: {};
|
|
775
877
|
defaultValue: null;
|
|
776
|
-
}
|
|
878
|
+
}>> & {} : never) | undefined;
|
|
777
879
|
directives?: TDirectives | undefined;
|
|
778
880
|
} | undefined) => { [K in TVarName]: {
|
|
779
881
|
kind: "scalar";
|
|
@@ -784,26 +886,26 @@ declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRunt
|
|
|
784
886
|
};
|
|
785
887
|
directives: TDirectives;
|
|
786
888
|
} };
|
|
787
|
-
enum: <const TTypeName_1 extends keyof TSchema["enum"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() =>
|
|
889
|
+
enum: <const TTypeName_1 extends keyof TSchema["enum"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
788
890
|
kind: "enum";
|
|
789
891
|
name: TTypeName_1;
|
|
790
892
|
modifier: TModifier;
|
|
791
893
|
directives: {};
|
|
792
894
|
defaultValue: null;
|
|
793
|
-
}
|
|
794
|
-
default?: (TDefaultFn & (() =>
|
|
895
|
+
}>> & {}) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["enum"] & string], TTypeName_1, TModifier>, extras?: {
|
|
896
|
+
default?: (TDefaultFn & (() => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
795
897
|
kind: "enum";
|
|
796
898
|
name: TTypeName_1;
|
|
797
899
|
modifier: TModifier;
|
|
798
900
|
directives: {};
|
|
799
901
|
defaultValue: null;
|
|
800
|
-
}
|
|
902
|
+
}>> & {})) | (NoInfer<TDefaultFn> extends null ? () => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
801
903
|
kind: "enum";
|
|
802
904
|
name: TTypeName_1;
|
|
803
905
|
modifier: TModifier;
|
|
804
906
|
directives: {};
|
|
805
907
|
defaultValue: null;
|
|
806
|
-
}
|
|
908
|
+
}>> & {} : never) | undefined;
|
|
807
909
|
directives?: TDirectives | undefined;
|
|
808
910
|
} | undefined) => { [K in TVarName]: {
|
|
809
911
|
kind: "enum";
|
|
@@ -814,26 +916,26 @@ declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRunt
|
|
|
814
916
|
};
|
|
815
917
|
directives: TDirectives;
|
|
816
918
|
} };
|
|
817
|
-
input: <const TTypeName_1 extends keyof TSchema["input"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() =>
|
|
919
|
+
input: <const TTypeName_1 extends keyof TSchema["input"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
818
920
|
kind: "input";
|
|
819
921
|
name: TTypeName_1;
|
|
820
922
|
modifier: TModifier;
|
|
821
923
|
directives: {};
|
|
822
924
|
defaultValue: null;
|
|
823
|
-
}
|
|
824
|
-
default?: (TDefaultFn & (() =>
|
|
925
|
+
}>> & {}) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["input"] & string], TTypeName_1, TModifier>, extras?: {
|
|
926
|
+
default?: (TDefaultFn & (() => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
825
927
|
kind: "input";
|
|
826
928
|
name: TTypeName_1;
|
|
827
929
|
modifier: TModifier;
|
|
828
930
|
directives: {};
|
|
829
931
|
defaultValue: null;
|
|
830
|
-
}
|
|
932
|
+
}>> & {})) | (NoInfer<TDefaultFn> extends null ? () => GetConstAssignableType<InferInputProfile<TSchema, {
|
|
831
933
|
kind: "input";
|
|
832
934
|
name: TTypeName_1;
|
|
833
935
|
modifier: TModifier;
|
|
834
936
|
directives: {};
|
|
835
937
|
defaultValue: null;
|
|
836
|
-
}
|
|
938
|
+
}>> & {} : never) | undefined;
|
|
837
939
|
directives?: TDirectives | undefined;
|
|
838
940
|
} | undefined) => { [K in TVarName]: {
|
|
839
941
|
kind: "input";
|
|
@@ -844,16 +946,16 @@ declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRunt
|
|
|
844
946
|
};
|
|
845
947
|
directives: TDirectives;
|
|
846
948
|
} };
|
|
847
|
-
byField: <const TTypeName_1 extends keyof TSchema["object"] & string, const TFieldName extends keyof TSchema["object"][TTypeName_1]["fields"] & string, const TArgName extends keyof TSchema["object"][TTypeName_1]["fields"][TFieldName]["arguments"] & string>(typeName: TTypeName_1, fieldName: TFieldName, argName: TArgName) => TSchema["object"][TTypeName_1]["fields"][TFieldName]["arguments"][TArgName];
|
|
949
|
+
byField: <const TTypeName_1 extends keyof TSchema["object"] & string, const TFieldName$1 extends keyof TSchema["object"][TTypeName_1]["fields"] & string, const TArgName extends keyof TSchema["object"][TTypeName_1]["fields"][TFieldName$1]["arguments"] & string>(typeName: TTypeName_1, fieldName: TFieldName$1, argName: TArgName) => TSchema["object"][TTypeName_1]["fields"][TFieldName$1]["arguments"][TArgName];
|
|
848
950
|
};
|
|
849
951
|
}>;
|
|
850
952
|
//#endregion
|
|
851
953
|
//#region packages/core/src/composer/model.d.ts
|
|
852
954
|
declare const createGqlModelComposers: <TSchema extends AnyGraphqlSchema>(schema: NoInfer<TSchema>) => Omit<{ readonly [TTypeName in keyof TSchema["object"]]: TTypeName extends string ? <TFieldEntries extends AnyFields[], TNormalized extends object, TVarDefinitions extends InputTypeSpecifiers[] = [{}]>(options: {
|
|
853
955
|
variables?: TVarDefinitions | undefined;
|
|
854
|
-
}, builder: FieldsBuilder<TSchema, TTypeName, MergeVarDefinitions<TVarDefinitions>, TFieldEntries>, normalize: (raw: NoInfer<
|
|
956
|
+
}, builder: FieldsBuilder<TSchema, TTypeName, MergeVarDefinitions<TVarDefinitions>, TFieldEntries>, normalize: (raw: NoInfer<InferFields<TSchema, MergeFields<TFieldEntries>>>) => TNormalized) => Model<TTypeName, SwitchIfEmpty<MergeVarDefinitions<TVarDefinitions>, void, AssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions>>>, MergeFields<TFieldEntries> & {
|
|
855
957
|
[key: symbol]: never;
|
|
856
|
-
},
|
|
958
|
+
}, InferFields<TSchema, MergeFields<TFieldEntries>> & {
|
|
857
959
|
[key: symbol]: never;
|
|
858
960
|
}, TNormalized> : never }, TSchema["operations"][keyof OperationRoots] & keyof TSchema["object"]>;
|
|
859
961
|
//#endregion
|
|
@@ -870,130 +972,90 @@ declare const createSliceComposerFactory: <TSchema extends AnyGraphqlSchema, TRu
|
|
|
870
972
|
}, TProjection>;
|
|
871
973
|
//#endregion
|
|
872
974
|
//#region packages/core/src/composer/var-builder.d.ts
|
|
975
|
+
type AssignableDefaultValue<TSchema extends AnyGraphqlSchema, TKind extends "scalar" | "enum" | "input", TName extends keyof TSchema[TKind] & string, TModifier extends TypeModifier> = ConstAssignableInputValue<TSchema, {
|
|
976
|
+
scalar: {
|
|
977
|
+
kind: "scalar";
|
|
978
|
+
name: TName;
|
|
979
|
+
modifier: TModifier;
|
|
980
|
+
directives: {};
|
|
981
|
+
defaultValue: null;
|
|
982
|
+
};
|
|
983
|
+
enum: {
|
|
984
|
+
kind: "enum";
|
|
985
|
+
name: TName;
|
|
986
|
+
modifier: TModifier;
|
|
987
|
+
directives: {};
|
|
988
|
+
defaultValue: null;
|
|
989
|
+
};
|
|
990
|
+
input: {
|
|
991
|
+
kind: "input";
|
|
992
|
+
name: TName;
|
|
993
|
+
modifier: TModifier;
|
|
994
|
+
directives: {};
|
|
995
|
+
defaultValue: null;
|
|
996
|
+
};
|
|
997
|
+
}[TKind]>;
|
|
873
998
|
declare const createVarBuilder: <TSchema extends AnyGraphqlSchema>(schema: TSchema) => {
|
|
874
999
|
$: <TVarName extends string>(varName: TVarName) => {
|
|
875
|
-
scalar: <const TTypeName extends keyof TSchema["scalar"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() =>
|
|
876
|
-
|
|
877
|
-
name: TTypeName;
|
|
878
|
-
modifier: TModifier;
|
|
879
|
-
directives: {};
|
|
880
|
-
defaultValue: null;
|
|
881
|
-
}>) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<string, TTypeName, TModifier>, extras?: {
|
|
882
|
-
default?: (TDefaultFn & (() => ConstAssignableInputValue<TSchema, {
|
|
883
|
-
kind: "scalar";
|
|
884
|
-
name: TTypeName;
|
|
885
|
-
modifier: TModifier;
|
|
886
|
-
directives: {};
|
|
887
|
-
defaultValue: null;
|
|
888
|
-
}>)) | (NoInfer<TDefaultFn> extends null ? () => ConstAssignableInputValue<TSchema, {
|
|
889
|
-
kind: "scalar";
|
|
890
|
-
name: TTypeName;
|
|
891
|
-
modifier: TModifier;
|
|
892
|
-
directives: {};
|
|
893
|
-
defaultValue: null;
|
|
894
|
-
}> : never) | undefined;
|
|
1000
|
+
scalar: <const TTypeName$1 extends keyof TSchema["scalar"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => AssignableDefaultValue<TSchema, "scalar", TTypeName$1, TModifier>) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["scalar"] & string], TTypeName$1, TModifier>, extras?: {
|
|
1001
|
+
default?: (TDefaultFn & (() => AssignableDefaultValue<TSchema, "scalar", TTypeName$1, TModifier>)) | (NoInfer<TDefaultFn> extends null ? () => AssignableDefaultValue<TSchema, "scalar", TTypeName$1, TModifier> : never) | undefined;
|
|
895
1002
|
directives?: TDirectives | undefined;
|
|
896
1003
|
} | undefined) => { [K in TVarName]: {
|
|
897
1004
|
kind: "scalar";
|
|
898
|
-
name: TTypeName;
|
|
1005
|
+
name: TTypeName$1;
|
|
899
1006
|
modifier: TModifier;
|
|
900
1007
|
defaultValue: TDefaultFn extends null ? null : {
|
|
901
1008
|
default: ReturnType<NonNullable<TDefaultFn>>;
|
|
902
1009
|
};
|
|
903
1010
|
directives: TDirectives;
|
|
904
1011
|
} };
|
|
905
|
-
enum: <const TTypeName extends keyof TSchema["enum"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() =>
|
|
906
|
-
|
|
907
|
-
name: TTypeName;
|
|
908
|
-
modifier: TModifier;
|
|
909
|
-
directives: {};
|
|
910
|
-
defaultValue: null;
|
|
911
|
-
}>) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<string, TTypeName, TModifier>, extras?: {
|
|
912
|
-
default?: (TDefaultFn & (() => ConstAssignableInputValue<TSchema, {
|
|
913
|
-
kind: "enum";
|
|
914
|
-
name: TTypeName;
|
|
915
|
-
modifier: TModifier;
|
|
916
|
-
directives: {};
|
|
917
|
-
defaultValue: null;
|
|
918
|
-
}>)) | (NoInfer<TDefaultFn> extends null ? () => ConstAssignableInputValue<TSchema, {
|
|
919
|
-
kind: "enum";
|
|
920
|
-
name: TTypeName;
|
|
921
|
-
modifier: TModifier;
|
|
922
|
-
directives: {};
|
|
923
|
-
defaultValue: null;
|
|
924
|
-
}> : never) | undefined;
|
|
1012
|
+
enum: <const TTypeName$1 extends keyof TSchema["enum"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => AssignableDefaultValue<TSchema, "enum", TTypeName$1, TModifier>) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["enum"] & string], TTypeName$1, TModifier>, extras?: {
|
|
1013
|
+
default?: (TDefaultFn & (() => AssignableDefaultValue<TSchema, "enum", TTypeName$1, TModifier>)) | (NoInfer<TDefaultFn> extends null ? () => AssignableDefaultValue<TSchema, "enum", TTypeName$1, TModifier> : never) | undefined;
|
|
925
1014
|
directives?: TDirectives | undefined;
|
|
926
1015
|
} | undefined) => { [K in TVarName]: {
|
|
927
1016
|
kind: "enum";
|
|
928
|
-
name: TTypeName;
|
|
1017
|
+
name: TTypeName$1;
|
|
929
1018
|
modifier: TModifier;
|
|
930
1019
|
defaultValue: TDefaultFn extends null ? null : {
|
|
931
1020
|
default: ReturnType<NonNullable<TDefaultFn>>;
|
|
932
1021
|
};
|
|
933
1022
|
directives: TDirectives;
|
|
934
1023
|
} };
|
|
935
|
-
input: <const TTypeName extends keyof TSchema["input"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() =>
|
|
936
|
-
|
|
937
|
-
name: TTypeName;
|
|
938
|
-
modifier: TModifier;
|
|
939
|
-
directives: {};
|
|
940
|
-
defaultValue: null;
|
|
941
|
-
}>) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<string, TTypeName, TModifier>, extras?: {
|
|
942
|
-
default?: (TDefaultFn & (() => ConstAssignableInputValue<TSchema, {
|
|
943
|
-
kind: "input";
|
|
944
|
-
name: TTypeName;
|
|
945
|
-
modifier: TModifier;
|
|
946
|
-
directives: {};
|
|
947
|
-
defaultValue: null;
|
|
948
|
-
}>)) | (NoInfer<TDefaultFn> extends null ? () => ConstAssignableInputValue<TSchema, {
|
|
949
|
-
kind: "input";
|
|
950
|
-
name: TTypeName;
|
|
951
|
-
modifier: TModifier;
|
|
952
|
-
directives: {};
|
|
953
|
-
defaultValue: null;
|
|
954
|
-
}> : never) | undefined;
|
|
1024
|
+
input: <const TTypeName$1 extends keyof TSchema["input"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => AssignableDefaultValue<TSchema, "input", TTypeName$1, TModifier>) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["input"] & string], TTypeName$1, TModifier>, extras?: {
|
|
1025
|
+
default?: (TDefaultFn & (() => AssignableDefaultValue<TSchema, "input", TTypeName$1, TModifier>)) | (NoInfer<TDefaultFn> extends null ? () => AssignableDefaultValue<TSchema, "input", TTypeName$1, TModifier> : never) | undefined;
|
|
955
1026
|
directives?: TDirectives | undefined;
|
|
956
1027
|
} | undefined) => { [K in TVarName]: {
|
|
957
1028
|
kind: "input";
|
|
958
|
-
name: TTypeName;
|
|
1029
|
+
name: TTypeName$1;
|
|
959
1030
|
modifier: TModifier;
|
|
960
1031
|
defaultValue: TDefaultFn extends null ? null : {
|
|
961
1032
|
default: ReturnType<NonNullable<TDefaultFn>>;
|
|
962
1033
|
};
|
|
963
1034
|
directives: TDirectives;
|
|
964
1035
|
} };
|
|
965
|
-
byField: <const TTypeName extends keyof TSchema["object"] & string, const TFieldName extends keyof TSchema["object"][TTypeName]["fields"] & string, const TArgName extends keyof TSchema["object"][TTypeName]["fields"][TFieldName]["arguments"] & string>(typeName: TTypeName, fieldName: TFieldName, argName: TArgName) => TSchema["object"][TTypeName]["fields"][TFieldName]["arguments"][TArgName];
|
|
1036
|
+
byField: <const TTypeName$1 extends keyof TSchema["object"] & string, const TFieldName$1 extends keyof TSchema["object"][TTypeName$1]["fields"] & string, const TArgName extends keyof TSchema["object"][TTypeName$1]["fields"][TFieldName$1]["arguments"] & string>(typeName: TTypeName$1, fieldName: TFieldName$1, argName: TArgName) => TSchema["object"][TTypeName$1]["fields"][TFieldName$1]["arguments"][TArgName];
|
|
966
1037
|
};
|
|
967
1038
|
};
|
|
968
1039
|
//#endregion
|
|
969
1040
|
//#region packages/core/src/schema/schema-builder.d.ts
|
|
970
|
-
declare const defineScalar: <const TName extends string, TInput, TOutput
|
|
971
|
-
type: typeof hidden;
|
|
972
|
-
}) => {
|
|
973
|
-
input: Hidden<TInput>;
|
|
974
|
-
output: Hidden<TOutput>;
|
|
975
|
-
directives: TDirectives;
|
|
976
|
-
}) => { [K in TName]: {
|
|
977
|
-
_type: Hidden<{
|
|
978
|
-
input: TInput;
|
|
979
|
-
output: TOutput;
|
|
980
|
-
}>;
|
|
1041
|
+
declare const defineScalar: <const TName extends string, TInput, TOutput>(name: NoInfer<TName>) => { [K in TName]: ScalarDefinition<{
|
|
981
1042
|
name: TName;
|
|
982
|
-
|
|
983
|
-
|
|
1043
|
+
input: TInput;
|
|
1044
|
+
output: TOutput;
|
|
1045
|
+
}> };
|
|
984
1046
|
declare const define: <const TName extends string>(name: TName) => {
|
|
985
|
-
enum: <const TValues extends EnumDefinition<
|
|
986
|
-
_type: () => keyof TValues & string;
|
|
1047
|
+
enum: <const TValues extends EnumDefinition<{
|
|
987
1048
|
name: TName;
|
|
988
|
-
values:
|
|
989
|
-
|
|
990
|
-
};
|
|
991
|
-
input: <TFields extends InputDefinition["fields"], TDirectives_1 extends AnyConstDirectiveAttachments>(fields: TFields, directives: TDirectives_1) => {
|
|
1049
|
+
values: string;
|
|
1050
|
+
}>["values"]>(values: TValues) => EnumDefinition<{
|
|
992
1051
|
name: TName;
|
|
993
|
-
|
|
994
|
-
|
|
1052
|
+
values: Extract<keyof TValues, string>;
|
|
1053
|
+
}>;
|
|
1054
|
+
input: <TFields$1 extends InputDefinition["fields"]>(fields: TFields$1) => {
|
|
1055
|
+
name: TName;
|
|
1056
|
+
fields: TFields$1;
|
|
995
1057
|
};
|
|
996
|
-
object: <TFields extends ObjectDefinition["fields"]
|
|
1058
|
+
object: <TFields$1 extends ObjectDefinition["fields"]>(fields: TFields$1) => {
|
|
997
1059
|
name: TName;
|
|
998
1060
|
fields: {
|
|
999
1061
|
__typename: {
|
|
@@ -1001,22 +1063,19 @@ declare const define: <const TName extends string>(name: TName) => {
|
|
|
1001
1063
|
name: `${TName}`;
|
|
1002
1064
|
modifier: "!";
|
|
1003
1065
|
arguments: {};
|
|
1004
|
-
directives: AnyConstDirectiveAttachments;
|
|
1005
1066
|
};
|
|
1006
|
-
} & TFields;
|
|
1007
|
-
directives: TDirectives_2;
|
|
1067
|
+
} & TFields$1;
|
|
1008
1068
|
};
|
|
1009
|
-
union: <TTypes extends UnionDefinition["types"]
|
|
1069
|
+
union: <TTypes extends UnionDefinition["types"]>(types: TTypes) => {
|
|
1010
1070
|
name: TName;
|
|
1011
1071
|
types: TTypes;
|
|
1012
|
-
directives: TDirectives_3;
|
|
1013
1072
|
};
|
|
1014
1073
|
};
|
|
1015
1074
|
declare const defineOperationRoots: <const TOperationRoots extends OperationRoots>(operationRoots: TOperationRoots) => TOperationRoots;
|
|
1016
1075
|
//#endregion
|
|
1017
1076
|
//#region packages/core/src/schema/type-specifier-builder.d.ts
|
|
1018
1077
|
declare const unsafeInputType: {
|
|
1019
|
-
scalar: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type:
|
|
1078
|
+
scalar: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1020
1079
|
default?: TDefaultFactory | undefined;
|
|
1021
1080
|
directives?: TDirectives | undefined;
|
|
1022
1081
|
}) => {
|
|
@@ -1028,7 +1087,7 @@ declare const unsafeInputType: {
|
|
|
1028
1087
|
};
|
|
1029
1088
|
directives: TDirectives;
|
|
1030
1089
|
};
|
|
1031
|
-
enum: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type:
|
|
1090
|
+
enum: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1032
1091
|
default?: TDefaultFactory | undefined;
|
|
1033
1092
|
directives?: TDirectives | undefined;
|
|
1034
1093
|
}) => {
|
|
@@ -1040,7 +1099,7 @@ declare const unsafeInputType: {
|
|
|
1040
1099
|
};
|
|
1041
1100
|
directives: TDirectives;
|
|
1042
1101
|
};
|
|
1043
|
-
input: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type:
|
|
1102
|
+
input: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1044
1103
|
default?: TDefaultFactory | undefined;
|
|
1045
1104
|
directives?: TDirectives | undefined;
|
|
1046
1105
|
}) => {
|
|
@@ -1054,60 +1113,50 @@ declare const unsafeInputType: {
|
|
|
1054
1113
|
};
|
|
1055
1114
|
};
|
|
1056
1115
|
declare const unsafeOutputType: {
|
|
1057
|
-
scalar: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}
|
|
1116
|
+
scalar: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1058
1117
|
arguments?: TArguments | undefined;
|
|
1059
|
-
directives?: TDirectives | undefined;
|
|
1060
1118
|
}) => {
|
|
1061
1119
|
kind: "scalar";
|
|
1062
1120
|
name: TName;
|
|
1063
1121
|
modifier: TModifier;
|
|
1064
1122
|
arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
|
|
1065
|
-
directives: TDirectives;
|
|
1066
1123
|
};
|
|
1067
|
-
enum: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}
|
|
1124
|
+
enum: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1068
1125
|
arguments?: TArguments | undefined;
|
|
1069
|
-
directives?: TDirectives | undefined;
|
|
1070
1126
|
}) => {
|
|
1071
1127
|
kind: "enum";
|
|
1072
1128
|
name: TName;
|
|
1073
1129
|
modifier: TModifier;
|
|
1074
1130
|
arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
|
|
1075
|
-
directives: TDirectives;
|
|
1076
1131
|
};
|
|
1077
|
-
object: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}
|
|
1132
|
+
object: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1078
1133
|
arguments?: TArguments | undefined;
|
|
1079
|
-
directives?: TDirectives | undefined;
|
|
1080
1134
|
}) => {
|
|
1081
1135
|
kind: "object";
|
|
1082
1136
|
name: TName;
|
|
1083
1137
|
modifier: TModifier;
|
|
1084
1138
|
arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
|
|
1085
|
-
directives: TDirectives;
|
|
1086
1139
|
};
|
|
1087
|
-
union: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}
|
|
1140
|
+
union: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1088
1141
|
arguments?: TArguments | undefined;
|
|
1089
|
-
directives?: TDirectives | undefined;
|
|
1090
1142
|
}) => {
|
|
1091
1143
|
kind: "union";
|
|
1092
1144
|
name: TName;
|
|
1093
1145
|
modifier: TModifier;
|
|
1094
1146
|
arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
|
|
1095
|
-
directives: TDirectives;
|
|
1096
1147
|
};
|
|
1097
|
-
typename: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}
|
|
1148
|
+
typename: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
|
|
1098
1149
|
arguments?: TArguments | undefined;
|
|
1099
|
-
directives?: TDirectives | undefined;
|
|
1100
1150
|
}) => {
|
|
1101
1151
|
kind: "typename";
|
|
1102
1152
|
name: TName;
|
|
1103
1153
|
modifier: TModifier;
|
|
1104
1154
|
arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
|
|
1105
|
-
directives: TDirectives;
|
|
1106
1155
|
};
|
|
1107
1156
|
};
|
|
1108
1157
|
//#endregion
|
|
1109
1158
|
//#region packages/core/src/utils/wrap-by-key.d.ts
|
|
1110
|
-
declare
|
|
1159
|
+
declare function wrapByKey<TName extends string, TValue>(name: TName, value: TValue): { [K in TName]: TValue };
|
|
1111
1160
|
//#endregion
|
|
1112
|
-
export {
|
|
1113
|
-
//# sourceMappingURL=index-
|
|
1161
|
+
export { InferOutputOfSlice as $, GetConstAssignableType as $n, AnyDirectiveAttachments as $t, FieldSelectionFactoryPrimitiveReturn as A, InputTypeKind as An, GqlElementContext as At, AnyExecutionResultProjectionsBuilder as B, OutputTypenameSpecifier as Bn, AbstractFieldSelection as Bt, InlineOperation as C, UnionTypeRecord as Cn, StripFunctions as Ct, FieldSelectionFactory as D, InputInferrableTypeSpecifier as Dn, Hidden as Dt, FieldSelectionFactories as E, InputEnumSpecifier as En, UnionToIntersection as Et, MergeFields as F, OutputObjectSpecifier as Fn, buildOperationTypeNode as Ft, ComposedOperationDefinitionBuilder as G, AnyVarRef as Gn, FieldSelectionTemplateOf as Gt, AnyComposedOperation as H, GetAssignableType as Hn, AnyFields as Ht, NestedObjectFieldsBuilder as I, OutputScalarSpecifier as In, buildWithTypeModifier as It, ProjectionPathGraphNode as J, createVarRefFromConstValue as Jn, AnyConstDirectiveAttachments as Jt, ConcatSlicePayloads as K, AnyVarRefMeta as Kn, InferField as Kt, NestedObjectFieldsBuilderTools as L, OutputTypeKind as Ln, AnyFieldPath as Lt, FieldSelectionFactoryUnionReturn as M, InputTypeSpecifiers as Mn, buildArgumentValue as Mt, FieldsBuilder as N, OutputEnumSpecifier as Nn, buildConstValueNode as Nt, FieldSelectionFactoryFieldArguments as O, InputInputObjectSpecifier as On, hidden as Ot, FieldsBuilderTools as P, OutputInferrableTypeSpecifier as Pn, buildDocument as Pt, AnySlicePayloads as Q, GetAssigningType as Qn, ConstAssignableInputValue as Qt, NestedUnionFieldsBuilder as R, OutputTypeSpecifier as Rn, AvailableFieldPathOf as Rt, AnyInlineOperationOf as S, UnionMemberName as Sn, AnyGraphqlRuntimeAdapter as St, AnyFieldSelectionFactoryReturn as T, AnyTypeSpecifier as Tn, Tuple as Tt, AnyComposedOperationOf as U, ModifiedTypeName as Un, AnyNestedObject as Ut, ExecutionResultProjectionsBuilder as V, OutputUnionSpecifier as Vn, AnyFieldSelection as Vt, ComposedOperation as W, parseModifiedTypeName as Wn, AnyNestedUnion as Wt, AnySliceOf as X, getVarRefInner as Xn, AnyConstAssignableInputValue as Xt, AnySlice as Y, createVarRefFromVariable as Yn, AnyConstAssignableInput as Yt, AnySlicePayload as Z, isVarRef as Zn, ConstAssignableInput as Zt, createVarRefs as _, OperationRoots as _n, EmptyResult as _t, defineOperationRoots as a, AssignableInputValue as an, ValidTypeModifier as ar, empty as at, Model as b, ScalarDefinition as bn, NormalizedError as bt, createSliceComposerFactory as c, AnyGraphqlSchema as cn, Projection as ct, GqlElementComposer as d, InferInputProfile as dn, AnySlicedExecutionResultRecord as dt, AnyAssignableInput as en, GetModifiedType as er, Slice as et, createGqlElementComposer as f, InferOutputProfile as fn, SafeUnwrapResult as ft, createVarAssignments as g, ObjectFieldRecord as gn, SlicedExecutionResultSuccess as gt, MergeVarDefinitions as h, ObjectDefinition as hn, SlicedExecutionResultError as ht, define as i, AssignableInputByFieldName as in, TypeModifier as ir, SwitchIfEmpty as it, FieldSelectionFactoryReturn as j, InputTypeSpecifier as jn, GqlElementDefinitionFactory as jt, FieldSelectionFactoryObjectReturn as k, InputScalarSpecifier as kn, GqlElement as kt, createPathGraphFromSliceEntries as l, AnyTypeName as ln, ProjectionPath as lt, createComposedOperationComposerFactory as m, InputFieldRecord as mn, SlicedExecutionResultEmpty as mt, unsafeInputType as n, AnyAssigningInput as nn, TypeProfile as nr, EmptyObject as nt, defineScalar as o, AssigningInput as on, ConstValue as or, AnyProjection as ot, createFieldFactories as p, InputDefinition as pn, SlicedExecutionResult as pt, InferComposedOperationRawData as q, VarRef as qn, InferFields as qt, unsafeOutputType as r, AssignableInput as rn, ApplyTypeModifier as rr, IfEmpty as rt, createVarBuilder as s, AnyFieldName as sn, ConstValues as sr, InferExecutionResultProjection as st, wrapByKey as t, AnyAssignableInputValue as tn, PrimitiveTypeProfile as tr, SlicePayload as tt, createGqlModelComposers as u, EnumDefinition as un, AnySlicedExecutionResult as ut, mergeVarDefinitions as v, OperationType as vn, GraphqlExecutionResult as vt, AnyFieldSelectionFactory as w, AnyDefaultValue as wn, StripSymbols as wt, AnyInlineOperation as x, UnionDefinition as xn, NormalizedExecutionResult as xt, AnyModel as y, PickTypeSpecifierByFieldName as yn, NonGraphqlErrorResult as yt, mergeFields as z, OutputTypeSpecifiers as zn, InferByFieldPath as zt };
|
|
1162
|
+
//# sourceMappingURL=index-DsMrzee1.d.cts.map
|