@soda-gql/core 0.0.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +247 -0
  2. package/dist/adapter.cjs +35 -0
  3. package/dist/adapter.cjs.map +1 -0
  4. package/dist/adapter.d.cts +35 -0
  5. package/dist/adapter.d.cts.map +1 -0
  6. package/dist/adapter.d.ts +35 -0
  7. package/dist/adapter.d.ts.map +1 -0
  8. package/dist/adapter.js +34 -0
  9. package/dist/adapter.js.map +1 -0
  10. package/dist/index-B-erotAZ.d.cts +657 -0
  11. package/dist/index-B-erotAZ.d.cts.map +1 -0
  12. package/dist/index-Djr9A4KL.d.ts +657 -0
  13. package/dist/index-Djr9A4KL.d.ts.map +1 -0
  14. package/dist/index.cjs +450 -348
  15. package/dist/index.cjs.map +1 -0
  16. package/dist/index.d.cts +88 -2
  17. package/dist/index.d.cts.map +1 -0
  18. package/dist/index.d.ts +88 -2
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +420 -323
  21. package/dist/index.js.map +1 -1
  22. package/dist/runtime.cjs +85 -0
  23. package/dist/runtime.cjs.map +1 -0
  24. package/dist/runtime.d.cts +40 -0
  25. package/dist/runtime.d.cts.map +1 -0
  26. package/dist/runtime.d.ts +40 -0
  27. package/dist/runtime.d.ts.map +1 -0
  28. package/dist/runtime.js +82 -0
  29. package/dist/runtime.js.map +1 -0
  30. package/dist/schema-Bip7o0g3.cjs +128 -0
  31. package/dist/schema-Bip7o0g3.cjs.map +1 -0
  32. package/dist/schema-BygZwEX8.d.ts +494 -0
  33. package/dist/schema-BygZwEX8.d.ts.map +1 -0
  34. package/dist/schema-D9wIW5Dl.js +86 -0
  35. package/dist/schema-D9wIW5Dl.js.map +1 -0
  36. package/dist/schema-DRkKucYe.d.cts +494 -0
  37. package/dist/schema-DRkKucYe.d.cts.map +1 -0
  38. package/dist/schema-builder-8zadflz-.d.cts +40 -0
  39. package/dist/schema-builder-8zadflz-.d.cts.map +1 -0
  40. package/dist/schema-builder-vwQtCGYI.d.ts +40 -0
  41. package/dist/schema-builder-vwQtCGYI.d.ts.map +1 -0
  42. package/package.json +34 -7
  43. package/dist/index-CFNJ_Aa6.d.ts +0 -1185
  44. package/dist/index-CFNJ_Aa6.d.ts.map +0 -1
  45. package/dist/index-DHh8XRal.d.cts +0 -1185
  46. package/dist/index-DHh8XRal.d.cts.map +0 -1
  47. package/dist/runtime/index.cjs +0 -105
  48. package/dist/runtime/index.d.cts +0 -71
  49. package/dist/runtime/index.d.cts.map +0 -1
  50. package/dist/runtime/index.d.ts +0 -71
  51. package/dist/runtime/index.d.ts.map +0 -1
  52. package/dist/runtime/index.js +0 -102
  53. package/dist/runtime/index.js.map +0 -1
  54. package/dist/slice-DlVY4UJG.cjs +0 -333
  55. package/dist/slice-ua5mSfhV.js +0 -256
  56. package/dist/slice-ua5mSfhV.js.map +0 -1
@@ -1,1185 +0,0 @@
1
- import { TypedDocumentNode } from "@graphql-typed-document-node/core";
2
- import { ConstValueNode, FormattedExecutionResult, GraphQLFormattedError, NamedTypeNode, OperationTypeNode, TypeNode, ValueNode } from "graphql";
3
-
4
- //#region packages/core/src/types/type-foundation/const-value.d.ts
5
- type ConstValue = string | number | boolean | null | undefined | {
6
- readonly [key: string]: ConstValue;
7
- } | readonly ConstValue[];
8
- type ConstValues = {
9
- readonly [key: string]: ConstValue;
10
- };
11
- //#endregion
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;
50
- //#endregion
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>;
69
- };
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;
92
- };
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>): {
116
- name: TName;
117
- modifier: TModifier;
118
- };
119
- //#endregion
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
159
- type AnyDefaultValue = {
160
- default: ConstValue;
161
- };
162
- type InputTypeKind = "scalar" | "enum" | "input";
163
- type OutputTypeKind = "scalar" | "enum" | "object" | "union" | "typename";
164
- type AnyTypeSpecifier = {
165
- readonly kind: string;
166
- readonly name: string;
167
- readonly modifier: TypeModifier;
168
- readonly defaultValue?: AnyDefaultValue | null;
169
- readonly arguments?: InputTypeSpecifiers;
170
- };
171
- type AbstractInputTypeSpecifier<TKind extends InputTypeKind> = {
172
- readonly kind: TKind;
173
- readonly name: string;
174
- readonly modifier: TypeModifier;
175
- readonly defaultValue: AnyDefaultValue | null;
176
- };
177
- type InputTypeSpecifiers = {
178
- [key: string]: InputTypeSpecifier;
179
- };
180
- type InputTypeSpecifier = InputScalarSpecifier | InputEnumSpecifier | InputInputObjectSpecifier;
181
- type InputInferrableTypeSpecifier = InputScalarSpecifier | InputEnumSpecifier;
182
- type InputScalarSpecifier = AbstractInputTypeSpecifier<"scalar">;
183
- type InputEnumSpecifier = AbstractInputTypeSpecifier<"enum">;
184
- type InputInputObjectSpecifier = AbstractInputTypeSpecifier<"input">;
185
- type AbstractOutputTypeSpecifier<TKind extends OutputTypeKind> = {
186
- readonly kind: TKind;
187
- readonly name: string;
188
- readonly modifier: TypeModifier;
189
- readonly arguments: InputTypeSpecifiers;
190
- };
191
- type OutputTypeSpecifiers = {
192
- [key: string]: OutputTypeSpecifier;
193
- };
194
- type OutputTypeSpecifier = OutputScalarSpecifier | OutputEnumSpecifier | OutputObjectSpecifier | OutputUnionSpecifier | OutputTypenameSpecifier;
195
- type OutputInferrableTypeSpecifier = OutputScalarSpecifier | OutputEnumSpecifier | OutputTypenameSpecifier;
196
- type OutputScalarSpecifier = AbstractOutputTypeSpecifier<"scalar">;
197
- type OutputEnumSpecifier = AbstractOutputTypeSpecifier<"enum">;
198
- type OutputObjectSpecifier = AbstractOutputTypeSpecifier<"object">;
199
- type OutputUnionSpecifier = AbstractOutputTypeSpecifier<"union">;
200
- type OutputTypenameSpecifier = AbstractOutputTypeSpecifier<"typename">;
201
- //#endregion
202
- //#region packages/core/src/types/schema/schema.d.ts
203
- type OperationType = keyof OperationRoots;
204
- type AnyTypeName = string;
205
- type AnyFieldName = string;
206
- type AnyGraphqlSchema = {
207
- readonly label: string;
208
- readonly operations: OperationRoots;
209
- readonly scalar: {
210
- readonly [name: string]: ScalarDefinition<any>;
211
- };
212
- readonly enum: {
213
- readonly [name: string]: EnumDefinition<any>;
214
- };
215
- readonly input: {
216
- readonly [name: string]: InputDefinition;
217
- };
218
- readonly object: {
219
- readonly [name: string]: ObjectDefinition;
220
- };
221
- readonly union: {
222
- readonly [name: string]: UnionDefinition;
223
- };
224
- };
225
- type OperationRoots = {
226
- readonly query: string | null;
227
- readonly mutation: string | null;
228
- readonly subscription: string | null;
229
- };
230
- interface ScalarDefinition<T$1 extends {
231
- name: string;
232
- input: unknown;
233
- output: unknown;
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 {
270
- readonly name: string;
271
- readonly fields: InputTypeSpecifiers;
272
- }
273
- type ObjectDefinition = {
274
- readonly name: string;
275
- readonly fields: OutputTypeSpecifiers;
276
- };
277
- type UnionDefinition = {
278
- readonly name: string;
279
- readonly types: {
280
- [typename: string]: true;
281
- };
282
- };
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;
290
- //#endregion
291
- //#region packages/core/src/types/fragment/assignable-input.d.ts
292
- type AnyAssignableInputValue = ConstValue | AnyVarRef | {
293
- [key: string]: AnyAssignableInputValue;
294
- } | AnyAssignableInputValue[] | undefined | null;
295
- type AnyAssignableInput = {
296
- readonly [key: string]: AnyAssignableInputValue;
297
- };
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"]>;
306
- //#endregion
307
- //#region packages/core/src/types/fragment/directives.d.ts
308
- type AnyDirectiveAttachments = {
309
- readonly [key: string]: AnyAssignableInput;
310
- };
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
326
- //#region packages/core/src/types/fragment/field-selection.d.ts
327
- /**
328
- * Canonical representation of the field selections we collect during model and
329
- * slice definition. Each alias maps to a typed field reference that still
330
- * remembers its parent type, arguments, directives, and nested selections.
331
- */
332
- type AnyFieldSelection = {
333
- readonly parent: AnyTypeName;
334
- readonly field: AnyFieldName;
335
- readonly type: OutputTypeSpecifier;
336
- readonly args: AnyAssignableInput;
337
- readonly directives: AnyDirectiveAttachments;
338
- readonly object: AnyNestedObject | null;
339
- readonly union: AnyNestedUnion | null;
340
- };
341
- /** Nested selection produced when resolving an object field. */
342
- type AnyNestedObject = {
343
- readonly [alias: string]: AnyFieldSelection;
344
- };
345
- /** Nested selection produced when resolving a union field. */
346
- type AnyNestedUnion = {
347
- readonly [typeName: string]: AnyNestedObject | undefined;
348
- };
349
- /** Map of alias → field reference used by builders and inference. */
350
- type AnyFields = {
351
- readonly [alias: string]: AnyFieldSelection;
352
- };
353
- /** Strongly typed field reference produced for concrete schema members. */
354
- type AbstractFieldSelection<TTypeName$1 extends AnyTypeName, TFieldName$1 extends AnyFieldName, TSpecifier$1 extends OutputTypeSpecifier, TArgs extends AnyAssignableInput, TDirectives extends AnyDirectiveAttachments, TExtras extends {
355
- object: AnyNestedObject;
356
- } | {
357
- union: AnyNestedUnion;
358
- } | {
359
- _?: never;
360
- }> = {
361
- readonly parent: TTypeName$1;
362
- readonly field: TFieldName$1;
363
- readonly type: TSpecifier$1;
364
- readonly args: TArgs;
365
- readonly directives: TDirectives;
366
- readonly object: TExtras extends {
367
- object: infer TObject;
368
- } ? TObject : null;
369
- readonly union: TExtras extends {
370
- union: infer TUnion;
371
- } ? TUnion : null;
372
- };
373
- /** Convenience alias to obtain a typed field reference from the schema. */
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 ? {
375
- object: AnyNestedObject;
376
- } : never) | (TRef extends OutputUnionSpecifier ? {
377
- union: AnyNestedUnion;
378
- } : never)> : never;
379
- /** Resolve the data shape produced by a set of field selections. */
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"]];
381
- /** Resolve the data shape for a single field reference, including nested objects/unions. */
382
- type InferField<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection> = (TSelection extends {
383
- type: infer TSpecifier extends OutputObjectSpecifier;
384
- object: infer TNested extends AnyNestedObject;
385
- } ? ApplyTypeModifier<InferFields<TSchema, TNested>, TSpecifier["modifier"]> : never) | (TSelection extends {
386
- type: infer TSpecifier extends OutputUnionSpecifier;
387
- union: infer TNested extends AnyNestedUnion;
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);
391
- //#endregion
392
- //#region packages/core/src/types/fragment/field-path.d.ts
393
- type AnyFieldPath = string;
394
- /**
395
- * Computes strongly typed "$.foo.bar" style selectors for a set of fields so
396
- * slice result transforms can reference response paths safely.
397
- */
398
- type AvailableFieldPathOf<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields> = AvailableFieldPathsInner<TSchema, TFields$1, "$">;
399
- /** Recursive helper used to build path strings for nested selections. */
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 {
401
- object: infer TNested extends AnyNestedObject;
402
- } ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields$1 & string];
403
- /** Resolve the TypeScript type located at a given field path. */
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, "$">;
405
- /** Internal helper that walks a field tree while matching a path literal. */
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 {
407
- object: infer TNested extends AnyNestedObject;
408
- } ? InferByFieldPathInner<TSchema, TNested, TPathTarget, `${TPathCurrent}.${TAliasName}`> : never : never }[keyof TFields$1];
409
- //#endregion
410
- //#region packages/core/src/composer/build-document.d.ts
411
- declare const buildArgumentValue: (value: AnyAssignableInputValue) => ValueNode | null;
412
- declare const buildConstValueNode: (value: ConstValue) => ConstValueNode | null;
413
- declare const buildWithTypeModifier: (modifier: TypeModifier, buildType: () => NamedTypeNode) => TypeNode;
414
- declare const buildOperationTypeNode: (operation: OperationType) => OperationTypeNode;
415
- declare const buildDocument: <TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields, TVarDefinitions extends InputTypeSpecifiers>(options: {
416
- operationName: string;
417
- operationType: OperationType;
418
- variables: TVarDefinitions;
419
- fields: TFields$1;
420
- }) => TypedDocumentNode<InferFields<TSchema, TFields$1>, ConstAssignableInput<TSchema, TVarDefinitions>>;
421
- //#endregion
422
- //#region packages/core/src/types/element/gql-element.d.ts
423
- declare const GQL_ELEMENT_FACTORY: unique symbol;
424
- declare const GQL_ELEMENT_CONTEXT: unique symbol;
425
- type GqlElementContext = {
426
- canonicalId: string;
427
- };
428
- type GqlElementDefinitionFactory<T$1> = (context: GqlElementContext | null) => T$1;
429
- declare abstract class GqlElement<TDefinition, TInfer extends object = object> {
430
- readonly $infer: TInfer;
431
- private [GQL_ELEMENT_FACTORY];
432
- private [GQL_ELEMENT_CONTEXT];
433
- protected constructor(define: GqlElementDefinitionFactory<TDefinition>);
434
- static setContext<TElement extends GqlElement<any>>(element: TElement, context: GqlElementContext): void;
435
- static evaluate(element: GqlElement<any>): void;
436
- static get<TValue>(element: GqlElement<TValue>): TValue;
437
- }
438
- //#endregion
439
- //#region packages/core/src/utils/hidden.d.ts
440
- declare const hidden: <T$1>() => (() => T$1);
441
- type Hidden<T$1> = () => T$1;
442
- //#endregion
443
- //#region packages/core/src/utils/type-utils.d.ts
444
- type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
445
- type Tuple<T$1> = [T$1, ...T$1[]];
446
- type StripFunctions<T$1 extends object> = { [K in keyof T$1 as K extends "$infer" ? never : T$1[K] extends ((...args: any[]) => any) ? never : K]: T$1[K] };
447
- type StripSymbols<T$1 extends object> = { [K in keyof T$1 as K extends symbol | "$infer" ? never : K]: T$1[K] };
448
- //#endregion
449
- //#region packages/core/src/types/runtime/runtime-adapter.d.ts
450
- /**
451
- * Defines the runtime surface that the typed layer depends on. Implementations
452
- * adapt framework-specific error payloads without leaking those types into the
453
- * generated code.
454
- */
455
- type AnyGraphqlRuntimeAdapter = {
456
- nonGraphqlErrorType: Hidden<any>;
457
- };
458
- //#endregion
459
- //#region packages/core/src/types/runtime/execution-result.d.ts
460
- type NormalizedExecutionResult<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TData, TExtensions> = EmptyResult | GraphqlExecutionResult<TData, TExtensions> | NonGraphqlErrorResult<TRuntimeAdapter>;
461
- type EmptyResult = {
462
- type: "empty";
463
- };
464
- type GraphqlExecutionResult<TData, TExtensions> = {
465
- type: "graphql";
466
- body: FormattedExecutionResult<TData, TExtensions>;
467
- };
468
- type NonGraphqlErrorResult<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> = {
469
- type: "non-graphql-error";
470
- error: ReturnType<TRuntimeAdapter["nonGraphqlErrorType"]>;
471
- };
472
- type NormalizedError<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> = {
473
- type: "graphql-error";
474
- errors: GraphQLFormattedError[];
475
- } | {
476
- type: "non-graphql-error";
477
- error: ReturnType<TRuntimeAdapter["nonGraphqlErrorType"]>;
478
- } | {
479
- type: "parse-error";
480
- errors: Error[];
481
- };
482
- //#endregion
483
- //#region packages/core/src/types/runtime/sliced-execution-result.d.ts
484
- type AnySlicedExecutionResult = SlicedExecutionResult<any, AnyGraphqlRuntimeAdapter>;
485
- /**
486
- * Internal discriminated union describing the Result-like wrapper exposed to
487
- * slice selection callbacks. The adapter decides how raw errors are
488
- * materialized.
489
- */
490
- type AnySlicedExecutionResultRecord = {
491
- [path: string]: AnySlicedExecutionResult;
492
- };
493
- type SafeUnwrapResult<TTransformed, TError> = {
494
- data?: never;
495
- error?: never;
496
- } | {
497
- data: TTransformed;
498
- error?: never;
499
- } | {
500
- data?: never;
501
- error: TError;
502
- };
503
- /** Utility signature returned by the safe unwrap helper. */
504
- type SlicedExecutionResultCommon<TData, TError> = {
505
- safeUnwrap<TTransformed>(transform: (data: TData) => TTransformed): SafeUnwrapResult<TTransformed, TError>;
506
- };
507
- /** Public union used by selection callbacks to inspect data, empty, or error states. */
508
- type SlicedExecutionResult<TData, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> = SlicedExecutionResultEmpty<TData, TRuntimeAdapter> | SlicedExecutionResultSuccess<TData, TRuntimeAdapter> | SlicedExecutionResultError<TData, TRuntimeAdapter>;
509
- /** Runtime guard interface shared by all slice result variants. */
510
- declare class SlicedExecutionResultGuards<TData, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> {
511
- private readonly type;
512
- isSuccess(): this is SlicedExecutionResultSuccess<TData, TRuntimeAdapter>;
513
- isError(): this is SlicedExecutionResultError<TData, TRuntimeAdapter>;
514
- isEmpty(): this is SlicedExecutionResultEmpty<TData, TRuntimeAdapter>;
515
- constructor(type: "success" | "error" | "empty");
516
- }
517
- /** Variant representing an empty payload (no data, no error). */
518
- declare class SlicedExecutionResultEmpty<TData, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> extends SlicedExecutionResultGuards<TData, TRuntimeAdapter> implements SlicedExecutionResultCommon<TData, NormalizedError<TRuntimeAdapter>> {
519
- constructor();
520
- unwrap(): null;
521
- safeUnwrap(): {
522
- data: undefined;
523
- error: undefined;
524
- };
525
- }
526
- /** Variant representing a successful payload. */
527
- declare class SlicedExecutionResultSuccess<TData, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> extends SlicedExecutionResultGuards<TData, TRuntimeAdapter> implements SlicedExecutionResultCommon<TData, NormalizedError<TRuntimeAdapter>> {
528
- readonly data: TData;
529
- readonly extensions?: unknown | undefined;
530
- constructor(data: TData, extensions?: unknown | undefined);
531
- unwrap(): TData;
532
- safeUnwrap<TTransformed>(transform: (data: TData) => TTransformed): {
533
- data: TTransformed;
534
- error: undefined;
535
- };
536
- }
537
- /** Variant representing an error payload created by the adapter. */
538
- declare class SlicedExecutionResultError<TData, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> extends SlicedExecutionResultGuards<TData, TRuntimeAdapter> implements SlicedExecutionResultCommon<TData, NormalizedError<TRuntimeAdapter>> {
539
- readonly error: NormalizedError<TRuntimeAdapter>;
540
- readonly extensions?: unknown | undefined;
541
- constructor(error: NormalizedError<TRuntimeAdapter>, extensions?: unknown | undefined);
542
- unwrap(): never;
543
- safeUnwrap(): {
544
- data: undefined;
545
- error: NormalizedError<TRuntimeAdapter>;
546
- };
547
- }
548
- //#endregion
549
- //#region packages/core/src/types/runtime/projection.d.ts
550
- /** Shape of a single selection slice projection. */
551
- type AnyProjection = Projection<any>;
552
- declare const __PROJECTION_BRAND__: unique symbol;
553
- /**
554
- * Nominal type representing any slice selection regardless of schema specifics.
555
- * Encodes how individual slices map a concrete field path to a projection
556
- * function. Multiple selections allow slices to expose several derived values.
557
- */
558
- declare class Projection<TProjected> {
559
- readonly projector: (result: AnySlicedExecutionResult) => TProjected;
560
- readonly [__PROJECTION_BRAND__]: Hidden<never>;
561
- constructor(paths: Tuple<string>, projector: (result: AnySlicedExecutionResult) => TProjected);
562
- readonly paths: ProjectionPath[];
563
- }
564
- type ProjectionPath = {
565
- full: string;
566
- segments: Tuple<string>;
567
- };
568
- type InferExecutionResultProjection<TProjection extends AnyProjection> = ReturnType<TProjection["projector"]>;
569
- //#endregion
570
- //#region packages/core/src/utils/empty-object.d.ts
571
- declare const __EMPTY_SYMBOL__: unique symbol;
572
- type EmptyObject = {
573
- readonly [__EMPTY_SYMBOL__]: never;
574
- };
575
- type IsEmptyObject<T$1> = keyof (T$1 & EmptyObject) extends keyof EmptyObject ? true : false;
576
- type IfEmpty<TTarget, TType> = IsEmptyObject<TTarget> extends true ? TType : never;
577
- type SwitchIfEmpty<TTarget, TTrue, TFalse> = IsEmptyObject<TTarget> extends true ? TTrue : TFalse;
578
- declare const empty: () => EmptyObject;
579
- //#endregion
580
- //#region packages/core/src/types/element/slice.d.ts
581
- type AnySlice = AnySliceOf<"query"> | AnySliceOf<"mutation"> | AnySliceOf<"subscription">;
582
- type AnySliceOf<TOperationType extends OperationType> = Slice<TOperationType, any, AnyFields, AnyProjection>;
583
- type SliceInferMeta<TVariables, TProjected> = {
584
- readonly input: TVariables;
585
- readonly output: TProjected;
586
- };
587
- type SliceDefinition<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> = {
588
- readonly operationType: TOperationType;
589
- readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
590
- };
591
- declare const __OPERATION_SLICE_BRAND__: unique symbol;
592
- 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>, SliceInferMeta<TVariables, InferExecutionResultProjection<TProjection>>> implements SliceDefinition<TOperationType, TVariables, TFields$1, TProjection> {
593
- readonly [__OPERATION_SLICE_BRAND__]: Hidden<{
594
- operationType: TOperationType;
595
- output: InferExecutionResultProjection<TProjection>;
596
- }>;
597
- private constructor();
598
- get operationType(): TOperationType;
599
- get embed(): (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
600
- static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields, TProjection extends AnyProjection>(define: () => {
601
- operationType: TOperationType;
602
- embed: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => SlicePayload<SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1, TProjection>;
603
- }): Slice<TOperationType, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1 & {
604
- [key: symbol]: never;
605
- }, TProjection>;
606
- }
607
- type AnySlicePayloads = {
608
- [key: string]: AnySlicePayload;
609
- };
610
- type AnySlicePayload = SlicePayload<AnyAssignableInput | void, AnyFields, AnyProjection>;
611
- type SlicePayload<TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> = {
612
- variables: TVariables;
613
- getFields: () => TFields$1;
614
- projection: TProjection;
615
- };
616
- type InferOutputOfSlice<TSlice extends AnySliceOf<any>> = ReturnType<TSlice[typeof __OPERATION_SLICE_BRAND__]>["output"];
617
- //#endregion
618
- //#region packages/core/src/types/element/composed-operation.d.ts
619
- type AnyComposedOperation = AnyComposedOperationOf<"query"> | AnyComposedOperationOf<"mutation"> | AnyComposedOperationOf<"subscription">;
620
- type AnyComposedOperationOf<TOperationType extends OperationType> = ComposedOperation<AnyGraphqlRuntimeAdapter, TOperationType, string, string[], any, any, any>;
621
- type ComposedOperationInferMeta<TVariables, TRawData extends object, TProjectedData extends object> = {
622
- readonly input: TVariables;
623
- readonly output: {
624
- readonly raw: TRawData;
625
- readonly projected: TProjectedData;
626
- };
627
- };
628
- declare const __COMPOSED_OPERATION_BRAND__: unique symbol;
629
- type ComposedOperationDefinition<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TRawData extends object, TProjectedData extends object> = {
630
- readonly operationType: TOperationType;
631
- readonly operationName: TOperationName;
632
- readonly variableNames: TVariableNames;
633
- readonly projectionPathGraph: ProjectionPathGraphNode;
634
- readonly document: TypedDocumentNode<TRawData, TVariables>;
635
- readonly parse: (result: NormalizedExecutionResult<TRuntimeAdapter, TRawData, any>) => TProjectedData;
636
- };
637
- declare class ComposedOperation<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TRawData extends object, TProjectedData extends object> extends GqlElement<ComposedOperationDefinition<TRuntimeAdapter, TOperationType, TOperationName, TVariableNames, TVariables, TRawData, TProjectedData>, ComposedOperationInferMeta<TVariables, TRawData, TProjectedData>> implements ComposedOperationDefinition<TRuntimeAdapter, TOperationType, TOperationName, TVariableNames, TVariables, TRawData, TProjectedData> {
638
- readonly [__COMPOSED_OPERATION_BRAND__]: Hidden<{
639
- operationType: TOperationType;
640
- }>;
641
- private constructor();
642
- get operationType(): TOperationType;
643
- get operationName(): TOperationName;
644
- get variableNames(): TVariableNames;
645
- get projectionPathGraph(): ProjectionPathGraphNode;
646
- get document(): TypedDocumentNode<TRawData, TVariables>;
647
- get parse(): (result: NormalizedExecutionResult<TRuntimeAdapter, TRawData, any>) => TProjectedData;
648
- static create<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TSliceFragments extends AnySlicePayloads>(define: (context: GqlElementContext | null) => {
649
- operationType: TOperationType;
650
- operationName: TOperationName;
651
- variableNames: (keyof TVariableDefinitions & string)[];
652
- projectionPathGraph: ProjectionPathGraphNode;
653
- document: TypedDocumentNode<InferComposedOperationRawData<TSchema, TSliceFragments>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
654
- parse: (result: NormalizedExecutionResult<TRuntimeAdapter, InferComposedOperationRawData<TSchema, TSliceFragments>, any>) => { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> };
655
- }): ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> }>;
656
- }
657
- type ProjectionPathGraphNode = {
658
- readonly matches: {
659
- label: string;
660
- path: string;
661
- exact: boolean;
662
- }[];
663
- readonly children: {
664
- readonly [segment: string]: ProjectionPathGraphNode;
665
- };
666
- };
667
- type ConcatSlicePayloads<TSlicePayloads extends AnySlicePayloads> = UnionToIntersection<{ [TLabel in keyof TSlicePayloads & string]: TSlicePayloads[TLabel] extends {
668
- getFields: () => infer TFields;
669
- } ? { [K in keyof TFields & string as `${TLabel}_${K}`]: TFields[K] } : {} }[keyof TSlicePayloads & string]> & AnyFields;
670
- type InferComposedOperationRawData<TSchema extends AnyGraphqlSchema, TSlicePayloads extends AnySlicePayloads> = InferFields<TSchema, ConcatSlicePayloads<TSlicePayloads>>;
671
- type ComposedOperationDefinitionBuilder<TSchema extends AnyGraphqlSchema, TVarDefinitions extends InputTypeSpecifiers, TSliceContents extends AnySlicePayloads> = (tools: {
672
- $: NoInfer<AssigningInput<TSchema, TVarDefinitions>>;
673
- }) => TSliceContents;
674
- //#endregion
675
- //#region packages/core/src/types/element/execution-result-projection-builder.d.ts
676
- type AnyExecutionResultProjectionsBuilder = ExecutionResultProjectionsBuilder<AnyGraphqlSchema, AnyGraphqlRuntimeAdapter, any, any>;
677
- type ExecutionResultProjectionsBuilder<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields$1 extends AnyFields, TProjection extends AnyProjection> = (tools: {
678
- select: ResultSelector<TSchema, TRuntimeAdapter, TFields$1>;
679
- }) => TProjection;
680
- 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>>;
681
- 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;
682
- //#endregion
683
- //#region packages/core/src/types/element/fields-builder.d.ts
684
- declare const mergeFields: <TFieldEntries extends AnyFields[]>(fields: TFieldEntries) => MergeFields<TFieldEntries>;
685
- type MergeFields<TFieldEntries extends AnyFields[]> = UnionToIntersection<TFieldEntries[number]> extends infer TFieldsIntersection ? { [TFieldName in keyof TFieldsIntersection]: TFieldsIntersection[TFieldName] extends AnyFieldSelection ? TFieldsIntersection[TFieldName] : never } & {} : never;
686
- /**
687
- * Builder signature exposed to userland `model` and `slice` helpers. The
688
- * tooling `f`/`fields`/`_` aliases provide ergonomic access to GraphQL fields
689
- * while preserving the original schema information for inference.
690
- */
691
- 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;
692
- type FieldsBuilderTools<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers> = {
693
- f: FieldSelectionFactories<TSchema, TTypeName$1>;
694
- $: AssigningInput<TSchema, TVariableDefinitions>;
695
- };
696
- /** Narrow builder used when a field resolves to an object and we need nested selections. */
697
- type NestedObjectFieldsBuilder<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TFields$1 extends AnyNestedObject[]> = (tools: NoInfer<NestedObjectFieldsBuilderTools<TSchema, TTypeName$1>>) => TFields$1;
698
- type NestedObjectFieldsBuilderTools<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string> = {
699
- f: FieldSelectionFactories<TSchema, TTypeName$1>;
700
- };
701
- type NestedUnionFieldsBuilder<TSchema extends AnyGraphqlSchema, TMemberName extends string, TUnionFields extends AnyNestedUnion> = { [TTypename in keyof TUnionFields & TMemberName]?: NestedObjectFieldsBuilder<TSchema, TTypename, NonNullable<TUnionFields[TTypename]>[]> };
702
- /** Map each field to a factory capable of emitting fully-typed references. */
703
- 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 };
704
- type AnyFieldSelectionFactory = <TAlias extends string | null = null>(fieldArgs: AnyAssignableInput | void, extras?: {
705
- alias?: TAlias;
706
- directives?: AnyDirectiveAttachments;
707
- }) => AnyFieldSelectionFactoryReturn<TAlias>;
708
- type FieldSelectionFactory<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection> = <TAlias extends string | null = null>(fieldArgs: TSelection["args"] | IfEmpty<TSelection["args"], void | null>, extras?: {
709
- alias?: TAlias;
710
- directives?: TSelection["directives"];
711
- }) => FieldSelectionFactoryReturn<TSchema, TSelection, TAlias>;
712
- type AnyFieldSelectionFactoryReturn<TAlias extends string | null> = FieldSelectionFactoryReturn<AnyGraphqlSchema, AnyFieldSelection & {
713
- type: OutputObjectSpecifier;
714
- }, TAlias> | FieldSelectionFactoryReturn<AnyGraphqlSchema, AnyFieldSelection & {
715
- type: OutputUnionSpecifier;
716
- }, TAlias> | FieldSelectionFactoryReturn<AnyGraphqlSchema, AnyFieldSelection & {
717
- type: OutputTypenameSpecifier | OutputScalarSpecifier | OutputEnumSpecifier;
718
- }, TAlias>;
719
- type FieldSelectionFactoryReturn<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection, TAlias extends string | null> = TSelection extends {
720
- type: OutputObjectSpecifier;
721
- } ? FieldSelectionFactoryObjectReturn<TSchema, TSelection, TAlias> : TSelection extends {
722
- type: OutputUnionSpecifier;
723
- } ? FieldSelectionFactoryUnionReturn<TSchema, TSelection, TAlias> : TSelection extends {
724
- type: OutputTypenameSpecifier | OutputScalarSpecifier | OutputEnumSpecifier;
725
- } ? FieldSelectionFactoryPrimitiveReturn<TSelection, TAlias> : never;
726
- type FieldSelectionFactoryObjectReturn<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection & {
727
- type: OutputObjectSpecifier;
728
- }, 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"], {
729
- object: MergeFields<TNested$1>;
730
- }> };
731
- type FieldSelectionFactoryUnionReturn<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection & {
732
- type: OutputUnionSpecifier;
733
- }, 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"], {
734
- union: TNested$1;
735
- }> };
736
- type FieldSelectionFactoryPrimitiveReturn<TSelection extends AnyFieldSelection & {
737
- type: OutputTypenameSpecifier | OutputScalarSpecifier | OutputEnumSpecifier;
738
- }, TAlias extends string | null> = { [_ in TAlias extends null ? TSelection["field"] : TAlias]: AbstractFieldSelection<TSelection["parent"], TSelection["field"], TSelection["type"], TSelection["args"], TSelection["directives"], {}> };
739
- type FieldSelectionFactoryFieldArguments<TFieldSelectionTemplate extends AnyFieldSelection> = TFieldSelectionTemplate["args"] | IfEmpty<TFieldSelectionTemplate["args"], void | null>;
740
- //#endregion
741
- //#region packages/core/src/types/element/inline-operation.d.ts
742
- type AnyInlineOperation = AnyInlineOperationOf<"query"> | AnyInlineOperationOf<"mutation"> | AnyInlineOperationOf<"subscription">;
743
- type AnyInlineOperationOf<TOperationType extends OperationType> = InlineOperation<TOperationType, string, string[], any, AnyFields, any>;
744
- type InlineOperationInferMeta<TVariables, TData extends object> = {
745
- readonly input: TVariables;
746
- readonly output: TData;
747
- };
748
- declare const __INLINE_OPERATION_BRAND__: unique symbol;
749
- type InlineOperationArtifact<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields$1 extends Partial<AnyFields>, TData extends object> = {
750
- readonly operationType: TOperationType;
751
- readonly operationName: TOperationName;
752
- readonly variableNames: TVariableNames;
753
- readonly documentSource: () => TFields$1;
754
- readonly document: TypedDocumentNode<TData, TVariables>;
755
- };
756
- 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>, InlineOperationInferMeta<TVariables, TData>> implements InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields$1, TData> {
757
- readonly [__INLINE_OPERATION_BRAND__]: Hidden<{
758
- operationType: TOperationType;
759
- }>;
760
- private constructor();
761
- get operationType(): TOperationType;
762
- get operationName(): TOperationName;
763
- get variableNames(): TVariableNames;
764
- get documentSource(): () => TFields$1;
765
- get document(): TypedDocumentNode<TData, TVariables>;
766
- static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields>(define: (context: GqlElementContext | null) => {
767
- operationType: TOperationType;
768
- operationName: TOperationName;
769
- variableNames: (keyof TVariableDefinitions & string)[];
770
- documentSource: () => TFields$1;
771
- document: TypedDocumentNode<InferFields<TSchema, TFields$1>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
772
- }): InlineOperation<TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, TFields$1, InferFields<TSchema, TFields$1>>;
773
- }
774
- //#endregion
775
- //#region packages/core/src/types/element/model.d.ts
776
- type AnyModel = Model<string, any, AnyFields, any, any>;
777
- type ModelInferMeta<TVariables, TRaw extends object, TNormalized extends object> = {
778
- readonly input: TVariables;
779
- readonly output: {
780
- readonly raw: TRaw;
781
- readonly normalized: TNormalized;
782
- };
783
- };
784
- interface ModelArtifact<TTypeName$1 extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> {
785
- readonly typename: TTypeName$1;
786
- readonly fragment: (variables: TVariables) => TFields$1;
787
- readonly normalize: (raw: TRaw) => TNormalized;
788
- }
789
- declare const __MODEL_BRAND__: unique symbol;
790
- 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>, ModelInferMeta<TVariables, TRaw, TNormalized>> implements ModelArtifact<TTypeName$1, TVariables, TFields$1, TRaw, TNormalized> {
791
- readonly [__MODEL_BRAND__]: Hidden<{
792
- input: TVariables;
793
- output: TNormalized;
794
- }>;
795
- private constructor();
796
- get typename(): TTypeName$1;
797
- get fragment(): (variables: TVariables) => TFields$1;
798
- get normalize(): (raw: TRaw) => TNormalized;
799
- static create<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields, TNormalized extends object>(define: () => {
800
- typename: TTypeName$1;
801
- fragment: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => TFields$1;
802
- normalize: (raw: NoInfer<InferFields<TSchema, TFields$1>>) => TNormalized;
803
- }): Model<TTypeName$1, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1 & {
804
- [key: symbol]: never;
805
- }, InferFields<TSchema, TFields$1> & {
806
- [key: symbol]: never;
807
- }, TNormalized>;
808
- }
809
- //#endregion
810
- //#region packages/core/src/composer/input.d.ts
811
- declare const mergeVarDefinitions: <TVarDefinitions extends InputTypeSpecifiers[]>(definitions: TVarDefinitions) => MergeVarDefinitions<TVarDefinitions>;
812
- type MergeVarDefinitions<TVarDefinitions extends InputTypeSpecifiers[]> = UnionToIntersection<TVarDefinitions[number]> extends infer TDefinitions ? { readonly [K in keyof TDefinitions]: TDefinitions[K] } : never;
813
- declare const createVarAssignments: <TSchema extends AnyGraphqlSchema, TVariableDefinitions extends InputTypeSpecifiers>(definitions: TVariableDefinitions, providedValues: AnyAssignableInput | void) => AssigningInput<TSchema, TVariableDefinitions>;
814
- declare const createVarRefs: <TSchema extends AnyGraphqlSchema, TVarDefinitions extends InputTypeSpecifiers>(definitions: TVarDefinitions) => AssigningInput<TSchema, TVarDefinitions>;
815
- //#endregion
816
- //#region packages/core/src/composer/composed-operation.d.ts
817
- declare const createComposedOperationComposerFactory: <TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>() => <TOperationType extends OperationType>(operationType: TOperationType) => <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions extends InputTypeSpecifiers[] = [{}]>(options: {
818
- operationName: TOperationName;
819
- variables?: TVarDefinitions;
820
- }, 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"]> }>;
821
- //#endregion
822
- //#region packages/core/src/composer/fields-builder.d.ts
823
- declare const createFieldFactories: <TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string>(schema: TSchema, typeName: TTypeName$1) => FieldSelectionFactories<TSchema, TTypeName$1>;
824
- //#endregion
825
- //#region packages/core/src/composer/gql-composer.d.ts
826
- type GqlElementComposer<TComposers, THelper> = <TResult extends AnyModel | AnySlice | AnyComposedOperation | AnyInlineOperation>(composeElement: (composers: TComposers, helper: THelper) => TResult) => TResult;
827
- declare const createGqlElementComposer: <TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>(schema: NoInfer<TSchema>) => GqlElementComposer<{
828
- model: Omit<{ readonly [TTypeName in keyof TSchema["object"]]: TTypeName extends string ? <TFieldEntries extends AnyFields[], TNormalized extends object, TVarDefinitions extends InputTypeSpecifiers[] = [{}]>(options: {
829
- variables?: TVarDefinitions | undefined;
830
- }, 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> & {
831
- [key: symbol]: never;
832
- }, InferFields<TSchema, MergeFields<TFieldEntries>> & {
833
- [key: symbol]: never;
834
- }, TNormalized> : never }, TSchema["operations"][keyof OperationRoots] & keyof TSchema["object"]>;
835
- query: {
836
- slice: <TFieldEntries extends AnyFields[], TProjection extends AnyProjection, TVarDefinitions_1 extends InputTypeSpecifiers[] = [{}]>(options: {
837
- variables?: TVarDefinitions_1 | undefined;
838
- }, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["query"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_1>, TFieldEntries>, projectionBuilder: ExecutionResultProjectionsBuilder<TSchema, TRuntimeAdapter, MergeFields<TFieldEntries>, TProjection>) => Slice<"query", SwitchIfEmpty<MergeVarDefinitions<TVarDefinitions_1>, void, AssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_1>>>, MergeFields<TFieldEntries> & {
839
- [key: symbol]: never;
840
- }, TProjection>;
841
- composed: <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions_2 extends InputTypeSpecifiers[] = [{}]>(options: {
842
- operationName: TOperationName;
843
- variables?: TVarDefinitions_2 | undefined;
844
- }, 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"]> }>;
845
- inline: <TOperationName extends string, TFields$1 extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
846
- operationName: TOperationName;
847
- variables?: TVarDefinitions_3 | undefined;
848
- }, 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>>>;
849
- };
850
- mutation: {
851
- slice: <TFieldEntries extends AnyFields[], TProjection extends AnyProjection, TVarDefinitions_1 extends InputTypeSpecifiers[] = [{}]>(options: {
852
- variables?: TVarDefinitions_1 | undefined;
853
- }, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["mutation"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_1>, TFieldEntries>, projectionBuilder: ExecutionResultProjectionsBuilder<TSchema, TRuntimeAdapter, MergeFields<TFieldEntries>, TProjection>) => Slice<"mutation", SwitchIfEmpty<MergeVarDefinitions<TVarDefinitions_1>, void, AssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_1>>>, MergeFields<TFieldEntries> & {
854
- [key: symbol]: never;
855
- }, TProjection>;
856
- composed: <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions_2 extends InputTypeSpecifiers[] = [{}]>(options: {
857
- operationName: TOperationName;
858
- variables?: TVarDefinitions_2 | undefined;
859
- }, 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"]> }>;
860
- inline: <TOperationName extends string, TFields$1 extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
861
- operationName: TOperationName;
862
- variables?: TVarDefinitions_3 | undefined;
863
- }, 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>>>;
864
- };
865
- subscription: {
866
- slice: <TFieldEntries extends AnyFields[], TProjection extends AnyProjection, TVarDefinitions_1 extends InputTypeSpecifiers[] = [{}]>(options: {
867
- variables?: TVarDefinitions_1 | undefined;
868
- }, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"]["subscription"] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions_1>, TFieldEntries>, projectionBuilder: ExecutionResultProjectionsBuilder<TSchema, TRuntimeAdapter, MergeFields<TFieldEntries>, TProjection>) => Slice<"subscription", SwitchIfEmpty<MergeVarDefinitions<TVarDefinitions_1>, void, AssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions_1>>>, MergeFields<TFieldEntries> & {
869
- [key: symbol]: never;
870
- }, TProjection>;
871
- composed: <TOperationName extends string, TSliceFragments extends AnySlicePayloads, TVarDefinitions_2 extends InputTypeSpecifiers[] = [{}]>(options: {
872
- operationName: TOperationName;
873
- variables?: TVarDefinitions_2 | undefined;
874
- }, 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"]> }>;
875
- inline: <TOperationName extends string, TFields$1 extends AnyFields[], TVarDefinitions_3 extends InputTypeSpecifiers[] = [{}]>(options: {
876
- operationName: TOperationName;
877
- variables?: TVarDefinitions_3 | undefined;
878
- }, 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>>>;
879
- };
880
- }, {
881
- $: <TVarName extends string>(varName: TVarName) => {
882
- scalar: <const TTypeName_1 extends keyof TSchema["scalar"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => GetConstAssignableType<InferInputProfile<TSchema, {
883
- kind: "scalar";
884
- name: TTypeName_1;
885
- modifier: TModifier;
886
- directives: {};
887
- defaultValue: null;
888
- }>> & {}) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["scalar"] & string], TTypeName_1, TModifier>, extras?: {
889
- default?: (TDefaultFn & (() => GetConstAssignableType<InferInputProfile<TSchema, {
890
- kind: "scalar";
891
- name: TTypeName_1;
892
- modifier: TModifier;
893
- directives: {};
894
- defaultValue: null;
895
- }>> & {})) | (NoInfer<TDefaultFn> extends null ? () => GetConstAssignableType<InferInputProfile<TSchema, {
896
- kind: "scalar";
897
- name: TTypeName_1;
898
- modifier: TModifier;
899
- directives: {};
900
- defaultValue: null;
901
- }>> & {} : never) | undefined;
902
- directives?: TDirectives | undefined;
903
- } | undefined) => { [K in TVarName]: {
904
- kind: "scalar";
905
- name: TTypeName_1;
906
- modifier: TModifier;
907
- defaultValue: TDefaultFn extends null ? null : {
908
- default: ReturnType<NonNullable<TDefaultFn>>;
909
- };
910
- directives: TDirectives;
911
- } };
912
- enum: <const TTypeName_1 extends keyof TSchema["enum"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => GetConstAssignableType<InferInputProfile<TSchema, {
913
- kind: "enum";
914
- name: TTypeName_1;
915
- modifier: TModifier;
916
- directives: {};
917
- defaultValue: null;
918
- }>> & {}) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["enum"] & string], TTypeName_1, TModifier>, extras?: {
919
- default?: (TDefaultFn & (() => GetConstAssignableType<InferInputProfile<TSchema, {
920
- kind: "enum";
921
- name: TTypeName_1;
922
- modifier: TModifier;
923
- directives: {};
924
- defaultValue: null;
925
- }>> & {})) | (NoInfer<TDefaultFn> extends null ? () => GetConstAssignableType<InferInputProfile<TSchema, {
926
- kind: "enum";
927
- name: TTypeName_1;
928
- modifier: TModifier;
929
- directives: {};
930
- defaultValue: null;
931
- }>> & {} : never) | undefined;
932
- directives?: TDirectives | undefined;
933
- } | undefined) => { [K in TVarName]: {
934
- kind: "enum";
935
- name: TTypeName_1;
936
- modifier: TModifier;
937
- defaultValue: TDefaultFn extends null ? null : {
938
- default: ReturnType<NonNullable<TDefaultFn>>;
939
- };
940
- directives: TDirectives;
941
- } };
942
- input: <const TTypeName_1 extends keyof TSchema["input"] & string, const TModifier extends TypeModifier, const TDefaultFn extends (() => GetConstAssignableType<InferInputProfile<TSchema, {
943
- kind: "input";
944
- name: TTypeName_1;
945
- modifier: TModifier;
946
- directives: {};
947
- defaultValue: null;
948
- }>> & {}) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: ModifiedTypeName<[keyof TSchema["input"] & string], TTypeName_1, TModifier>, extras?: {
949
- default?: (TDefaultFn & (() => GetConstAssignableType<InferInputProfile<TSchema, {
950
- kind: "input";
951
- name: TTypeName_1;
952
- modifier: TModifier;
953
- directives: {};
954
- defaultValue: null;
955
- }>> & {})) | (NoInfer<TDefaultFn> extends null ? () => GetConstAssignableType<InferInputProfile<TSchema, {
956
- kind: "input";
957
- name: TTypeName_1;
958
- modifier: TModifier;
959
- directives: {};
960
- defaultValue: null;
961
- }>> & {} : never) | undefined;
962
- directives?: TDirectives | undefined;
963
- } | undefined) => { [K in TVarName]: {
964
- kind: "input";
965
- name: TTypeName_1;
966
- modifier: TModifier;
967
- defaultValue: TDefaultFn extends null ? null : {
968
- default: ReturnType<NonNullable<TDefaultFn>>;
969
- };
970
- directives: TDirectives;
971
- } };
972
- 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];
973
- };
974
- }>;
975
- //#endregion
976
- //#region packages/core/src/composer/model.d.ts
977
- 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: {
978
- variables?: TVarDefinitions | undefined;
979
- }, 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> & {
980
- [key: symbol]: never;
981
- }, InferFields<TSchema, MergeFields<TFieldEntries>> & {
982
- [key: symbol]: never;
983
- }, TNormalized> : never }, TSchema["operations"][keyof OperationRoots] & keyof TSchema["object"]>;
984
- //#endregion
985
- //#region packages/core/src/composer/projection-path-graph.d.ts
986
- declare function createPathGraphFromSliceEntries(fragments: {
987
- [key: string]: AnySlicePayload;
988
- }): ProjectionPathGraphNode;
989
- //#endregion
990
- //#region packages/core/src/composer/slice.d.ts
991
- declare const createSliceComposerFactory: <TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>(schema: NoInfer<TSchema>) => <TOperationType extends OperationType>(operationType: TOperationType) => <TFieldEntries extends AnyFields[], TProjection extends AnyProjection, TVarDefinitions extends InputTypeSpecifiers[] = [{}]>(options: {
992
- variables?: TVarDefinitions;
993
- }, fieldBuilder: FieldsBuilder<TSchema, TSchema["operations"][TOperationType] & keyof TSchema["object"] & string, MergeVarDefinitions<TVarDefinitions>, TFieldEntries>, projectionBuilder: ExecutionResultProjectionsBuilder<TSchema, TRuntimeAdapter, MergeFields<TFieldEntries>, TProjection>) => Slice<TOperationType, SwitchIfEmpty<MergeVarDefinitions<TVarDefinitions>, void, AssignableInput<TSchema, MergeVarDefinitions<TVarDefinitions>>>, MergeFields<TFieldEntries> & {
994
- [key: symbol]: never;
995
- }, TProjection>;
996
- //#endregion
997
- //#region packages/core/src/composer/var-builder.d.ts
998
- type AssignableDefaultValue<TSchema extends AnyGraphqlSchema, TKind extends "scalar" | "enum" | "input", TName extends keyof TSchema[TKind] & string, TModifier extends TypeModifier> = ConstAssignableInputValue<TSchema, {
999
- scalar: {
1000
- kind: "scalar";
1001
- name: TName;
1002
- modifier: TModifier;
1003
- directives: {};
1004
- defaultValue: null;
1005
- };
1006
- enum: {
1007
- kind: "enum";
1008
- name: TName;
1009
- modifier: TModifier;
1010
- directives: {};
1011
- defaultValue: null;
1012
- };
1013
- input: {
1014
- kind: "input";
1015
- name: TName;
1016
- modifier: TModifier;
1017
- directives: {};
1018
- defaultValue: null;
1019
- };
1020
- }[TKind]>;
1021
- declare const createVarBuilder: <TSchema extends AnyGraphqlSchema>(schema: TSchema) => {
1022
- $: <TVarName extends string>(varName: TVarName) => {
1023
- 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?: {
1024
- default?: (TDefaultFn & (() => AssignableDefaultValue<TSchema, "scalar", TTypeName$1, TModifier>)) | (NoInfer<TDefaultFn> extends null ? () => AssignableDefaultValue<TSchema, "scalar", TTypeName$1, TModifier> : never) | undefined;
1025
- directives?: TDirectives | undefined;
1026
- } | undefined) => { [K in TVarName]: {
1027
- kind: "scalar";
1028
- name: TTypeName$1;
1029
- modifier: TModifier;
1030
- defaultValue: TDefaultFn extends null ? null : {
1031
- default: ReturnType<NonNullable<TDefaultFn>>;
1032
- };
1033
- directives: TDirectives;
1034
- } };
1035
- 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?: {
1036
- default?: (TDefaultFn & (() => AssignableDefaultValue<TSchema, "enum", TTypeName$1, TModifier>)) | (NoInfer<TDefaultFn> extends null ? () => AssignableDefaultValue<TSchema, "enum", TTypeName$1, TModifier> : never) | undefined;
1037
- directives?: TDirectives | undefined;
1038
- } | undefined) => { [K in TVarName]: {
1039
- kind: "enum";
1040
- name: TTypeName$1;
1041
- modifier: TModifier;
1042
- defaultValue: TDefaultFn extends null ? null : {
1043
- default: ReturnType<NonNullable<TDefaultFn>>;
1044
- };
1045
- directives: TDirectives;
1046
- } };
1047
- 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?: {
1048
- default?: (TDefaultFn & (() => AssignableDefaultValue<TSchema, "input", TTypeName$1, TModifier>)) | (NoInfer<TDefaultFn> extends null ? () => AssignableDefaultValue<TSchema, "input", TTypeName$1, TModifier> : never) | undefined;
1049
- directives?: TDirectives | undefined;
1050
- } | undefined) => { [K in TVarName]: {
1051
- kind: "input";
1052
- name: TTypeName$1;
1053
- modifier: TModifier;
1054
- defaultValue: TDefaultFn extends null ? null : {
1055
- default: ReturnType<NonNullable<TDefaultFn>>;
1056
- };
1057
- directives: TDirectives;
1058
- } };
1059
- 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];
1060
- };
1061
- };
1062
- //#endregion
1063
- //#region packages/core/src/schema/schema-builder.d.ts
1064
- declare const defineScalar: <const TName extends string, TInput, TOutput>(name: NoInfer<TName>) => { [K in TName]: ScalarDefinition<{
1065
- name: TName;
1066
- input: TInput;
1067
- output: TOutput;
1068
- }> };
1069
- declare const define: <const TName extends string>(name: TName) => {
1070
- enum: <const TValues extends EnumDefinition<{
1071
- name: TName;
1072
- values: string;
1073
- }>["values"]>(values: TValues) => EnumDefinition<{
1074
- name: TName;
1075
- values: Extract<keyof TValues, string>;
1076
- }>;
1077
- input: <TFields$1 extends InputDefinition["fields"]>(fields: TFields$1) => {
1078
- name: TName;
1079
- fields: TFields$1;
1080
- };
1081
- object: <TFields$1 extends ObjectDefinition["fields"]>(fields: TFields$1) => {
1082
- name: TName;
1083
- fields: {
1084
- __typename: {
1085
- kind: "typename";
1086
- name: `${TName}`;
1087
- modifier: "!";
1088
- arguments: {};
1089
- };
1090
- } & TFields$1;
1091
- };
1092
- union: <TTypes extends UnionDefinition["types"]>(types: TTypes) => {
1093
- name: TName;
1094
- types: TTypes;
1095
- };
1096
- };
1097
- declare const defineOperationRoots: <const TOperationRoots extends OperationRoots>(operationRoots: TOperationRoots) => TOperationRoots;
1098
- //#endregion
1099
- //#region packages/core/src/schema/type-specifier-builder.d.ts
1100
- declare const unsafeInputType: {
1101
- scalar: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: `${TName}:${TModifier}`, extras: {
1102
- default?: TDefaultFactory | undefined;
1103
- directives?: TDirectives | undefined;
1104
- }) => {
1105
- kind: "scalar";
1106
- name: TName;
1107
- modifier: TModifier;
1108
- defaultValue: TDefaultFactory extends null ? null : {
1109
- default: ReturnType<NonNullable<TDefaultFactory>>;
1110
- };
1111
- directives: TDirectives;
1112
- };
1113
- enum: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: `${TName}:${TModifier}`, extras: {
1114
- default?: TDefaultFactory | undefined;
1115
- directives?: TDirectives | undefined;
1116
- }) => {
1117
- kind: "enum";
1118
- name: TName;
1119
- modifier: TModifier;
1120
- defaultValue: TDefaultFactory extends null ? null : {
1121
- default: ReturnType<NonNullable<TDefaultFactory>>;
1122
- };
1123
- directives: TDirectives;
1124
- };
1125
- input: <const TName extends string, const TModifier extends TypeModifier, const TDefaultFactory extends (() => ConstValue) | null = null, const TDirectives extends AnyConstDirectiveAttachments = {}>(type: `${TName}:${TModifier}`, extras: {
1126
- default?: TDefaultFactory | undefined;
1127
- directives?: TDirectives | undefined;
1128
- }) => {
1129
- kind: "input";
1130
- name: TName;
1131
- modifier: TModifier;
1132
- defaultValue: TDefaultFactory extends null ? null : {
1133
- default: ReturnType<NonNullable<TDefaultFactory>>;
1134
- };
1135
- directives: TDirectives;
1136
- };
1137
- };
1138
- declare const unsafeOutputType: {
1139
- scalar: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
1140
- arguments?: TArguments | undefined;
1141
- }) => {
1142
- kind: "scalar";
1143
- name: TName;
1144
- modifier: TModifier;
1145
- arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
1146
- };
1147
- enum: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
1148
- arguments?: TArguments | undefined;
1149
- }) => {
1150
- kind: "enum";
1151
- name: TName;
1152
- modifier: TModifier;
1153
- arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
1154
- };
1155
- object: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
1156
- arguments?: TArguments | undefined;
1157
- }) => {
1158
- kind: "object";
1159
- name: TName;
1160
- modifier: TModifier;
1161
- arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
1162
- };
1163
- union: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
1164
- arguments?: TArguments | undefined;
1165
- }) => {
1166
- kind: "union";
1167
- name: TName;
1168
- modifier: TModifier;
1169
- arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
1170
- };
1171
- typename: <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(type: `${TName}:${TModifier}`, extras: {
1172
- arguments?: TArguments | undefined;
1173
- }) => {
1174
- kind: "typename";
1175
- name: TName;
1176
- modifier: TModifier;
1177
- arguments: InputTypeSpecifiers extends TArguments ? {} : TArguments;
1178
- };
1179
- };
1180
- //#endregion
1181
- //#region packages/core/src/utils/wrap-by-key.d.ts
1182
- declare function wrapByKey<TName extends string, TValue>(name: TName, value: TValue): { [K in TName]: TValue };
1183
- //#endregion
1184
- export { AnySliceOf as $, createVarRefFromVariable as $n, AnyConstAssignableInput as $t, FieldSelectionFactoryFieldArguments as A, InputEnumSpecifier as An, UnionToIntersection as At, NestedUnionFieldsBuilder as B, OutputScalarSpecifier as Bn, buildWithTypeModifier as Bt, AnyInlineOperationOf as C, PickTypeSpecifierByFieldName as Cn, NonGraphqlErrorResult as Ct, AnyFieldSelectionFactoryReturn as D, UnionTypeRecord as Dn, StripFunctions as Dt, AnyFieldSelectionFactory as E, UnionMemberName as En, AnyGraphqlRuntimeAdapter as Et, FieldsBuilder as F, InputTypeSpecifier as Fn, GqlElementDefinitionFactory as Ft, AnyComposedOperationOf as G, OutputUnionSpecifier as Gn, AnyFieldSelection as Gt, AnyExecutionResultProjectionsBuilder as H, OutputTypeSpecifier as Hn, AvailableFieldPathOf as Ht, FieldsBuilderTools as I, InputTypeSpecifiers as In, buildArgumentValue as It, ComposedOperationInferMeta as J, parseModifiedTypeName as Jn, AnyNestedUnion as Jt, ComposedOperation as K, GetAssignableType as Kn, AnyFields as Kt, MergeFields as L, OutputEnumSpecifier as Ln, buildConstValueNode as Lt, FieldSelectionFactoryPrimitiveReturn as M, InputInputObjectSpecifier as Mn, hidden as Mt, FieldSelectionFactoryReturn as N, InputScalarSpecifier as Nn, GqlElement as Nt, FieldSelectionFactories as O, AnyDefaultValue as On, StripSymbols as Ot, FieldSelectionFactoryUnionReturn as P, InputTypeKind as Pn, GqlElementContext as Pt, AnySlice as Q, createVarRefFromConstValue as Qn, AnyConstDirectiveAttachments as Qt, NestedObjectFieldsBuilder as R, OutputInferrableTypeSpecifier as Rn, buildDocument as Rt, AnyInlineOperation as S, OperationType as Sn, GraphqlExecutionResult as St, InlineOperationInferMeta as T, UnionDefinition as Tn, NormalizedExecutionResult as Tt, ExecutionResultProjectionsBuilder as U, OutputTypeSpecifiers as Un, InferByFieldPath as Ut, mergeFields as V, OutputTypeKind as Vn, AnyFieldPath as Vt, AnyComposedOperation as W, OutputTypenameSpecifier as Wn, AbstractFieldSelection as Wt, InferComposedOperationRawData as X, AnyVarRefMeta as Xn, InferField as Xt, ConcatSlicePayloads as Y, AnyVarRef as Yn, FieldSelectionTemplateOf as Yt, ProjectionPathGraphNode as Z, VarRef as Zn, InferFields as Zt, createVarRefs as _, InputDefinition as _n, SlicedExecutionResult as _t, defineOperationRoots as a, AnyAssignableInputValue as an, PrimitiveTypeProfile as ar, SlicePayload as at, Model as b, ObjectFieldRecord as bn, SlicedExecutionResultSuccess as bt, createSliceComposerFactory as c, AssignableInputByFieldName as cn, TypeModifier as cr, SwitchIfEmpty as ct, GqlElementComposer as d, AnyFieldName as dn, ConstValues as dr, InferExecutionResultProjection as dt, AnyConstAssignableInputValue as en, getVarRefInner as er, AnySlicePayload as et, createGqlElementComposer as f, AnyGraphqlSchema as fn, Projection as ft, createVarAssignments as g, InferOutputProfile as gn, SafeUnwrapResult as gt, MergeVarDefinitions as h, InferInputProfile as hn, AnySlicedExecutionResultRecord as ht, define as i, AnyAssignableInput as in, GetModifiedType as ir, SliceInferMeta as it, FieldSelectionFactoryObjectReturn as j, InputInferrableTypeSpecifier as jn, Hidden as jt, FieldSelectionFactory as k, AnyTypeSpecifier as kn, Tuple as kt, createPathGraphFromSliceEntries as l, AssignableInputValue as ln, ValidTypeModifier as lr, empty as lt, createComposedOperationComposerFactory as m, EnumDefinition as mn, AnySlicedExecutionResult as mt, unsafeInputType as n, ConstAssignableInputValue as nn, GetAssigningType as nr, InferOutputOfSlice as nt, defineScalar as o, AnyAssigningInput as on, TypeProfile as or, EmptyObject as ot, createFieldFactories as p, AnyTypeName as pn, ProjectionPath as pt, ComposedOperationDefinitionBuilder as q, ModifiedTypeName as qn, AnyNestedObject as qt, unsafeOutputType as r, AnyDirectiveAttachments as rn, GetConstAssignableType as rr, Slice as rt, createVarBuilder as s, AssignableInput as sn, ApplyTypeModifier as sr, IfEmpty as st, wrapByKey as t, ConstAssignableInput as tn, isVarRef as tr, AnySlicePayloads as tt, createGqlModelComposers as u, AssigningInput as un, ConstValue as ur, AnyProjection as ut, mergeVarDefinitions as v, InputFieldRecord as vn, SlicedExecutionResultEmpty as vt, InlineOperation as w, ScalarDefinition as wn, NormalizedError as wt, ModelInferMeta as x, OperationRoots as xn, EmptyResult as xt, AnyModel as y, ObjectDefinition as yn, SlicedExecutionResultError as yt, NestedObjectFieldsBuilderTools as z, OutputObjectSpecifier as zn, buildOperationTypeNode as zt };
1185
- //# sourceMappingURL=index-DHh8XRal.d.cts.map