@soda-gql/runtime 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -7,7 +7,7 @@ declare const GQL_ELEMENT_CONTEXT: unique symbol;
7
7
  type GqlElementContext = {
8
8
  canonicalId: string;
9
9
  };
10
- type GqlElementDefinitionFactory<T> = (context: GqlElementContext | null) => T;
10
+ type GqlElementDefinitionFactory<T$1> = (context: GqlElementContext | null) => T$1;
11
11
  declare abstract class GqlElement<TDefinition> {
12
12
  private [GQL_ELEMENT_FACTORY];
13
13
  private [GQL_ELEMENT_CONTEXT];
@@ -17,51 +17,166 @@ declare abstract class GqlElement<TDefinition> {
17
17
  static get<TValue>(element: GqlElement<TValue>): TValue;
18
18
  }
19
19
  //#endregion
20
- //#region packages/core/src/types/schema/const-value.d.ts
20
+ //#region packages/core/src/utils/hidden.d.ts
21
+ type Hidden<T$1> = () => T$1;
22
+ //#endregion
23
+ //#region packages/core/src/utils/type-utils.d.ts
24
+ type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
25
+ type Tuple<T$1> = [T$1, ...T$1[]];
26
+ type StripFunctions<T$1 extends object> = { [K in keyof T$1 as T$1[K] extends ((...args: any[]) => any) ? never : K]: T$1[K] };
27
+ //#endregion
28
+ //#region packages/core/src/types/type-foundation/const-value.d.ts
21
29
  type ConstValue = string | number | boolean | null | undefined | {
22
30
  readonly [key: string]: ConstValue;
23
31
  } | readonly ConstValue[];
24
32
  //#endregion
25
- //#region packages/core/src/utils/hidden.d.ts
26
- type Hidden<T> = () => T;
27
- //#endregion
28
- //#region packages/core/src/types/schema/type-modifier.d.ts
29
- type TypeModifier = "?" | `!${string}` | `[]${string}`;
30
- type ListTypeModifierSuffix = "[]" | "[]!";
31
- type StripTailingListFromTypeModifier<TModifier extends TypeModifier> = TModifier extends `${infer TInner extends TypeModifier}${ListTypeModifierSuffix}` ? TInner : TModifier;
32
- type ApplyTypeModifier<TModifier extends TypeModifier, TInner> = TModifier extends "!" ? TInner : TModifier extends "?" | "" ? TInner | null | undefined : TModifier extends `![]${infer TNext extends TypeModifier}` ? ApplyTypeModifier<TNext, TInner[]> : TModifier extends `[]${infer TNext extends TypeModifier}` ? ApplyTypeModifier<TNext, (TInner | null | undefined)[]> : never;
33
- type ApplyTypeModifierToKeys<T extends {
34
- [key: string]: {
35
- modifier: TypeModifier;
33
+ //#region packages/core/src/types/type-foundation/type-modifier-core.generated.d.ts
34
+ type TypeModifier = string;
35
+ interface Op$1<T$1> {
36
+ readonly 0: T$1[];
37
+ readonly 1: T$1[] | null | undefined;
38
+ }
39
+ type Modified_0<T$1> = T$1;
40
+ type Modified_1<T$1> = T$1 | null | undefined;
41
+ type Modified_00<T$1> = Op$1<Modified_0<T$1>>[0];
42
+ type Modified_01<T$1> = Op$1<Modified_0<T$1>>[1];
43
+ type Modified_10<T$1> = Op$1<Modified_1<T$1>>[0];
44
+ type Modified_11<T$1> = Op$1<Modified_1<T$1>>[1];
45
+ type Modified_000<T$1> = Op$1<Modified_00<T$1>>[0];
46
+ type Modified_001<T$1> = Op$1<Modified_00<T$1>>[1];
47
+ type Modified_010<T$1> = Op$1<Modified_01<T$1>>[0];
48
+ type Modified_011<T$1> = Op$1<Modified_01<T$1>>[1];
49
+ type Modified_100<T$1> = Op$1<Modified_10<T$1>>[0];
50
+ type Modified_101<T$1> = Op$1<Modified_10<T$1>>[1];
51
+ type Modified_110<T$1> = Op$1<Modified_11<T$1>>[0];
52
+ type Modified_111<T$1> = Op$1<Modified_11<T$1>>[1];
53
+ type Modified_0000<T$1> = Op$1<Modified_000<T$1>>[0];
54
+ type Modified_0001<T$1> = Op$1<Modified_000<T$1>>[1];
55
+ type Modified_0010<T$1> = Op$1<Modified_001<T$1>>[0];
56
+ type Modified_0011<T$1> = Op$1<Modified_001<T$1>>[1];
57
+ type Modified_0100<T$1> = Op$1<Modified_010<T$1>>[0];
58
+ type Modified_0101<T$1> = Op$1<Modified_010<T$1>>[1];
59
+ type Modified_0110<T$1> = Op$1<Modified_011<T$1>>[0];
60
+ type Modified_0111<T$1> = Op$1<Modified_011<T$1>>[1];
61
+ type Modified_1000<T$1> = Op$1<Modified_100<T$1>>[0];
62
+ type Modified_1001<T$1> = Op$1<Modified_100<T$1>>[1];
63
+ type Modified_1010<T$1> = Op$1<Modified_101<T$1>>[0];
64
+ type Modified_1011<T$1> = Op$1<Modified_101<T$1>>[1];
65
+ type Modified_1100<T$1> = Op$1<Modified_110<T$1>>[0];
66
+ type Modified_1101<T$1> = Op$1<Modified_110<T$1>>[1];
67
+ type Modified_1110<T$1> = Op$1<Modified_111<T$1>>[0];
68
+ type Modified_1111<T$1> = Op$1<Modified_111<T$1>>[1];
69
+ 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;
70
+ //#endregion
71
+ //#region packages/core/src/types/type-foundation/type-profile.d.ts
72
+ interface PrimitiveTypeProfile {
73
+ readonly kind: "scalar" | "enum";
74
+ readonly name: string;
75
+ readonly value: any;
76
+ }
77
+ type TypeProfile = [PrimitiveTypeProfile] | {
78
+ readonly [key: string]: TypeProfile.WithMeta;
79
+ };
80
+ declare namespace TypeProfile {
81
+ type WITH_DEFAULT_INPUT = "with_default_input";
82
+ type WithMeta = [TypeProfile, TypeModifier, WITH_DEFAULT_INPUT?];
83
+ 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);
84
+ type AssignableSignature<TProfile extends TypeProfile.WithMeta> = ApplyTypeModifier<"[TYPE_SIGNATURE]", TProfile[1]> | (TProfile[2] extends WITH_DEFAULT_INPUT ? undefined : never);
85
+ 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;
86
+ type AssignableVarRefMeta<TProfile extends TypeProfile.WithMeta> = {
87
+ profile: TProfile[0];
88
+ signature: AssignableSignature<TProfile>;
89
+ };
90
+ type AssigningVarRefMeta<TProfile extends TypeProfile.WithMeta> = {
91
+ profile: TProfile[0];
92
+ signature: Signature<TProfile>;
36
93
  };
37
- }> = { readonly [K in keyof T as T[K]["modifier"] extends `${string}!` ? K : never]-?: T[K] } & { readonly [K in keyof T as T[K]["modifier"] extends `${string}!` ? never : K]+?: T[K] };
94
+ 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>>;
95
+ type AssigningType<TProfile extends TypeProfile.WithMeta> = VarRef<AssigningVarRefMeta<TProfile>>;
96
+ }
97
+ type GetModifiedType<TProfile extends TypeProfile, TModifier extends TypeModifier> = TypeProfile.Type<[TProfile, TModifier]>;
98
+ type GetConstAssignableType<TProfile extends TypeProfile.WithMeta> = TypeProfile.Type<TProfile>;
38
99
  //#endregion
39
- //#region packages/core/src/types/schema/type-specifier.d.ts
100
+ //#region packages/core/src/types/type-foundation/var-ref.d.ts
101
+ interface AnyVarRefMeta {
102
+ readonly profile: TypeProfile;
103
+ readonly signature: unknown;
104
+ }
105
+ type VarRefInner = {
106
+ type: "variable";
107
+ name: string;
108
+ } | {
109
+ type: "const-value";
110
+ value: ConstValue;
111
+ };
112
+ type AnyVarRef = VarRef<any>;
113
+ declare const __VAR_REF_BRAND__: unique symbol;
114
+ declare class VarRef<TMeta extends AnyVarRefMeta> {
115
+ private readonly inner;
116
+ readonly [__VAR_REF_BRAND__]: TMeta;
117
+ constructor(inner: VarRefInner);
118
+ static getInner(varRef: AnyVarRef): VarRefInner;
119
+ }
120
+ //#endregion
121
+ //#region packages/core/src/utils/type-meta.d.ts
122
+ interface WithTypeMeta<T$1 extends object> {
123
+ readonly $type: T$1;
124
+ }
125
+ //#endregion
126
+ //#region packages/core/src/types/type-foundation/type-modifier-extension.generated.d.ts
127
+ interface Op<T$1> {
128
+ readonly 0: T$1[];
129
+ readonly 1: T$1[] | null | undefined;
130
+ }
131
+ type Ref<TProfile extends TypeProfile.WithMeta> = VarRef<TypeProfile.AssignableVarRefMeta<TProfile>>;
132
+ type Assignable_0<T$1 extends TypeProfile.WithMeta> = TypeProfile.AssignableType<[T$1[0], "!", T$1[2]]>;
133
+ type Assignable_1<T$1 extends TypeProfile.WithMeta> = TypeProfile.AssignableType<[T$1[0], "?", T$1[2]]>;
134
+ type Assignable_00<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]!", T$1[2]]> | Op<Assignable_0<[T$1[0], "!"]>>[0];
135
+ type Assignable_01<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?", T$1[2]]> | Op<Assignable_0<[T$1[0], "!"]>>[1];
136
+ type Assignable_10<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]!", T$1[2]]> | Op<Assignable_1<[T$1[0], "?"]>>[0];
137
+ type Assignable_11<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?", T$1[2]]> | Op<Assignable_1<[T$1[0], "?"]>>[1];
138
+ type Assignable_000<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]!", T$1[2]]> | Op<Assignable_00<[T$1[0], "!"]>>[0];
139
+ type Assignable_001<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]?", T$1[2]]> | Op<Assignable_00<[T$1[0], "!"]>>[1];
140
+ type Assignable_010<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]!", T$1[2]]> | Op<Assignable_01<[T$1[0], "!"]>>[0];
141
+ type Assignable_011<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]?", T$1[2]]> | Op<Assignable_01<[T$1[0], "!"]>>[1];
142
+ type Assignable_100<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]!", T$1[2]]> | Op<Assignable_10<[T$1[0], "?"]>>[0];
143
+ type Assignable_101<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]?", T$1[2]]> | Op<Assignable_10<[T$1[0], "?"]>>[1];
144
+ type Assignable_110<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]!", T$1[2]]> | Op<Assignable_11<[T$1[0], "?"]>>[0];
145
+ type Assignable_111<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]?", T$1[2]]> | Op<Assignable_11<[T$1[0], "?"]>>[1];
146
+ type Assignable_0000<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]![]!", T$1[2]]> | Op<Assignable_000<[T$1[0], "!"]>>[0];
147
+ type Assignable_0001<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]![]?", T$1[2]]> | Op<Assignable_000<[T$1[0], "!"]>>[1];
148
+ type Assignable_0010<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]?[]!", T$1[2]]> | Op<Assignable_001<[T$1[0], "!"]>>[0];
149
+ type Assignable_0011<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]![]?[]?", T$1[2]]> | Op<Assignable_001<[T$1[0], "!"]>>[1];
150
+ type Assignable_0100<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]![]!", T$1[2]]> | Op<Assignable_010<[T$1[0], "!"]>>[0];
151
+ type Assignable_0101<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]![]?", T$1[2]]> | Op<Assignable_010<[T$1[0], "!"]>>[1];
152
+ type Assignable_0110<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]?[]!", T$1[2]]> | Op<Assignable_011<[T$1[0], "!"]>>[0];
153
+ type Assignable_0111<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "![]?[]?[]?", T$1[2]]> | Op<Assignable_011<[T$1[0], "!"]>>[1];
154
+ type Assignable_1000<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]![]!", T$1[2]]> | Op<Assignable_100<[T$1[0], "?"]>>[0];
155
+ type Assignable_1001<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]![]?", T$1[2]]> | Op<Assignable_100<[T$1[0], "?"]>>[1];
156
+ type Assignable_1010<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]?[]!", T$1[2]]> | Op<Assignable_101<[T$1[0], "?"]>>[0];
157
+ type Assignable_1011<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]![]?[]?", T$1[2]]> | Op<Assignable_101<[T$1[0], "?"]>>[1];
158
+ type Assignable_1100<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]![]!", T$1[2]]> | Op<Assignable_110<[T$1[0], "?"]>>[0];
159
+ type Assignable_1101<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]![]?", T$1[2]]> | Op<Assignable_110<[T$1[0], "?"]>>[1];
160
+ type Assignable_1110<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]?[]!", T$1[2]]> | Op<Assignable_111<[T$1[0], "?"]>>[0];
161
+ type Assignable_1111<T$1 extends TypeProfile.WithMeta> = Ref<[T$1[0], "?[]?[]?[]?", T$1[2]]> | Op<Assignable_111<[T$1[0], "?"]>>[1];
162
+ 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;
163
+ //#endregion
164
+ //#region packages/core/src/types/type-foundation/type-specifier.d.ts
40
165
  type AnyDefaultValue = {
41
166
  default: ConstValue;
42
167
  };
43
168
  type InputTypeKind = "scalar" | "enum" | "input";
44
169
  type OutputTypeKind = "scalar" | "enum" | "object" | "union" | "typename";
45
- type AnyTypeSpecifier = {
46
- readonly kind: string;
47
- readonly name: string;
48
- readonly modifier: TypeModifier;
49
- readonly directives: AnyConstDirectiveAttachments;
50
- readonly defaultValue?: AnyDefaultValue | null;
51
- readonly arguments?: InputTypeSpecifiers;
52
- };
53
170
  type AbstractInputTypeSpecifier<TKind extends InputTypeKind> = {
54
171
  readonly kind: TKind;
55
172
  readonly name: string;
56
173
  readonly modifier: TypeModifier;
57
- readonly directives: AnyConstDirectiveAttachments;
58
174
  readonly defaultValue: AnyDefaultValue | null;
59
175
  };
60
176
  type InputTypeSpecifiers = {
61
177
  [key: string]: InputTypeSpecifier;
62
178
  };
63
179
  type InputTypeSpecifier = InputScalarSpecifier | InputEnumSpecifier | InputInputObjectSpecifier;
64
- type InputInferrableTypeSpecifier = InputScalarSpecifier | InputEnumSpecifier;
65
180
  type InputScalarSpecifier = AbstractInputTypeSpecifier<"scalar">;
66
181
  type InputEnumSpecifier = AbstractInputTypeSpecifier<"enum">;
67
182
  type InputInputObjectSpecifier = AbstractInputTypeSpecifier<"input">;
@@ -69,7 +184,6 @@ type AbstractOutputTypeSpecifier<TKind extends OutputTypeKind> = {
69
184
  readonly kind: TKind;
70
185
  readonly name: string;
71
186
  readonly modifier: TypeModifier;
72
- readonly directives: AnyConstDirectiveAttachments;
73
187
  readonly arguments: InputTypeSpecifiers;
74
188
  };
75
189
  type OutputTypeSpecifiers = {
@@ -82,42 +196,13 @@ type OutputEnumSpecifier = AbstractOutputTypeSpecifier<"enum">;
82
196
  type OutputObjectSpecifier = AbstractOutputTypeSpecifier<"object">;
83
197
  type OutputUnionSpecifier = AbstractOutputTypeSpecifier<"union">;
84
198
  type OutputTypenameSpecifier = AbstractOutputTypeSpecifier<"typename">;
85
- type StripTailingListFromTypeSpecifier<TTypeSpecifier extends AnyTypeSpecifier> = TTypeSpecifier extends {
86
- defaultValue: AnyDefaultValue | null;
87
- } ? {
88
- readonly kind: TTypeSpecifier["kind"];
89
- readonly name: TTypeSpecifier["name"];
90
- readonly modifier: StripTailingListFromTypeModifier<TTypeSpecifier["modifier"]>;
91
- readonly directives: TTypeSpecifier["directives"];
92
- readonly defaultValue: TTypeSpecifier["modifier"] extends `${string}${ListTypeModifierSuffix}` ? null : TTypeSpecifier["defaultValue"];
93
- } : TTypeSpecifier extends {
94
- arguments: InputTypeSpecifiers;
95
- } ? {
96
- readonly kind: TTypeSpecifier["kind"];
97
- readonly name: TTypeSpecifier["name"];
98
- readonly modifier: StripTailingListFromTypeModifier<TTypeSpecifier["modifier"]>;
99
- readonly directives: TTypeSpecifier["directives"];
100
- readonly arguments: TTypeSpecifier["arguments"];
101
- } : never;
102
- //#endregion
103
- //#region packages/core/src/types/schema/const-assignable-input.d.ts
104
- type AnyConstAssignableInputValue = ConstValue;
105
- type AnyConstAssignableInput = {
106
- readonly [key: string]: AnyConstAssignableInputValue;
107
- };
108
- type ConstAssignableInput<TSchema extends AnyGraphqlSchema, TRefs extends InputTypeSpecifiers> = { readonly [K in keyof ApplyTypeModifierToKeys<TRefs>]: ConstAssignableInputValue<TSchema, TRefs[K]> };
109
- type ConstAssignableInputValue<TSchema extends AnyGraphqlSchema, TRef extends InputTypeSpecifier> = TRef["modifier"] extends `${string}${ListTypeModifierSuffix}` ? ConstAssignableInputValue<TSchema, StripTailingListFromTypeSpecifier<TRef>>[] : (TRef extends InputInputObjectSpecifier ? ConstAssignableInput<TSchema, InputFieldRecord<TSchema, TRef>> : never) | (TRef extends InputInferrableTypeSpecifier ? InferInputTypeRef<TSchema, TRef> : never);
110
- //#endregion
111
- //#region packages/core/src/types/schema/const-directives.d.ts
112
- type AnyConstDirectiveAttachments = {
113
- readonly [key: string]: AnyConstAssignableInputValue;
114
- };
115
199
  //#endregion
116
200
  //#region packages/core/src/types/schema/schema.d.ts
117
201
  type OperationType = keyof OperationRoots;
118
202
  type AnyTypeName = string;
119
203
  type AnyFieldName = string;
120
204
  type AnyGraphqlSchema = {
205
+ readonly label: string;
121
206
  readonly operations: OperationRoots;
122
207
  readonly scalar: {
123
208
  readonly [name: string]: ScalarDefinition<any>;
@@ -140,71 +225,61 @@ type OperationRoots = {
140
225
  readonly mutation: string | null;
141
226
  readonly subscription: string | null;
142
227
  };
143
- type ScalarDefinition<T extends {
228
+ interface ScalarDefinition<T$1 extends {
229
+ name: string;
144
230
  input: unknown;
145
231
  output: unknown;
146
- }> = {
147
- readonly _type: Hidden<{
148
- input: T["input"];
149
- output: T["output"];
150
- }>;
151
- readonly name: string;
152
- readonly directives: AnyConstDirectiveAttachments;
153
- };
154
- type EnumDefinition<T extends string> = {
155
- readonly _type: Hidden<T>;
156
- readonly name: string;
157
- readonly values: { readonly [_ in T]: true };
158
- readonly directives: AnyConstDirectiveAttachments;
159
- };
160
- type InputDefinition = {
232
+ }> extends WithTypeMeta<{
233
+ input: T$1["input"];
234
+ inputProfile: {
235
+ kind: "scalar";
236
+ name: T$1["name"];
237
+ value: T$1["input"];
238
+ };
239
+ output: T$1["output"];
240
+ outputProfile: {
241
+ kind: "scalar";
242
+ name: T$1["name"];
243
+ value: T$1["output"];
244
+ };
245
+ }> {
246
+ readonly name: T$1["name"];
247
+ }
248
+ interface EnumDefinition<T$1 extends {
249
+ name: string;
250
+ values: string;
251
+ }> extends WithTypeMeta<{
252
+ name: T$1["name"];
253
+ inputProfile: {
254
+ kind: "enum";
255
+ name: T$1["name"];
256
+ value: T$1["values"];
257
+ };
258
+ outputProfile: {
259
+ kind: "enum";
260
+ name: T$1["name"];
261
+ value: T$1["values"];
262
+ };
263
+ }> {
264
+ readonly name: T$1["name"];
265
+ readonly values: { readonly [_ in T$1["values"]]: true };
266
+ }
267
+ interface InputDefinition {
161
268
  readonly name: string;
162
269
  readonly fields: InputTypeSpecifiers;
163
- readonly directives: AnyConstDirectiveAttachments;
164
- };
270
+ }
165
271
  type ObjectDefinition = {
166
272
  readonly name: string;
167
273
  readonly fields: OutputTypeSpecifiers;
168
- readonly directives: AnyConstDirectiveAttachments;
169
274
  };
170
275
  type UnionDefinition = {
171
276
  readonly name: string;
172
277
  readonly types: {
173
278
  [typename: string]: true;
174
279
  };
175
- readonly directives: AnyConstDirectiveAttachments;
176
280
  };
177
- type InferInputTypeRef<TSchema extends AnyGraphqlSchema, TSpecifier extends InputInferrableTypeSpecifier> = (TSpecifier extends {
178
- defaultValue: null;
179
- } ? never : undefined) | (TSpecifier extends InputScalarSpecifier ? ApplyTypeModifier<TSpecifier["modifier"], ReturnType<TSchema["scalar"][TSpecifier["name"]]["_type"]>["input"]> : TSpecifier extends InputEnumSpecifier ? ApplyTypeModifier<TSpecifier["modifier"], ReturnType<TSchema["enum"][TSpecifier["name"]]["_type"]>> : never);
180
- type InferOutputTypeRef<TSchema extends AnyGraphqlSchema, TSpecifier extends OutputInferrableTypeSpecifier> = TSpecifier extends OutputScalarSpecifier ? ApplyTypeModifier<TSpecifier["modifier"], ReturnType<TSchema["scalar"][TSpecifier["name"]]["_type"]>["output"]> : TSpecifier extends OutputEnumSpecifier ? ApplyTypeModifier<TSpecifier["modifier"], ReturnType<TSchema["enum"][TSpecifier["name"]]["_type"]>> : TSpecifier extends OutputTypenameSpecifier ? ApplyTypeModifier<TSpecifier["modifier"], TSpecifier["name"]> : never;
181
- type InputFieldRecord<TSchema extends AnyGraphqlSchema, TSpecifier extends InputTypeSpecifier> = TSchema["input"][TSpecifier["name"]]["fields"];
182
- //#endregion
183
- //#region packages/core/src/utils/prettify.d.ts
184
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
185
- //#endregion
186
- //#region packages/core/src/types/fragment/var-ref.d.ts
187
- /** Nominal reference placeholder used inside `AnyVariableAssignments`. */
188
- type AnyVarRef = VarRef<any>;
189
- type AnyVarRefMeta = {
190
- readonly kind: string;
191
- readonly name: string;
192
- readonly modifier: unknown;
193
- };
194
- type VarRefBy<TRef extends InputTypeSpecifier> = VarRef<VarRefMetaBy<TRef>>;
195
- type VarRefMetaBy<TRef extends InputTypeSpecifier> = Prettify<{
196
- readonly kind: TRef["kind"];
197
- readonly name: TRef["name"];
198
- readonly modifier: ApplyTypeModifier<TRef["modifier"], "_"> | (TRef["defaultValue"] extends AnyDefaultValue ? null | undefined : never);
199
- }>;
200
- declare const __VAR_REF_BRAND__: unique symbol;
201
- /** Nominal reference used to defer variable binding while carrying type info. */
202
- declare class VarRef<TMeta extends AnyVarRefMeta> {
203
- readonly name: string;
204
- readonly [__VAR_REF_BRAND__]: Hidden<TMeta>;
205
- private constructor();
206
- static create<TRef extends InputTypeSpecifier>(name: string): VarRefBy<TRef>;
207
- }
281
+ 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"]];
282
+ 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"]];
208
283
  //#endregion
209
284
  //#region packages/core/src/types/fragment/assignable-input.d.ts
210
285
  type AnyAssignableInputValue = ConstValue | AnyVarRef | {
@@ -213,14 +288,24 @@ type AnyAssignableInputValue = ConstValue | AnyVarRef | {
213
288
  type AnyAssignableInput = {
214
289
  readonly [key: string]: AnyAssignableInputValue;
215
290
  };
216
- type AssignableInput<TSchema extends AnyGraphqlSchema, TRefs extends InputTypeSpecifiers> = { readonly [K in keyof ApplyTypeModifierToKeys<TRefs>]: AssignableInputValue<TSchema, TRefs[K]> };
217
- type AssignableInputValue<TSchema extends AnyGraphqlSchema, TRef extends InputTypeSpecifier> = VarRefBy<TRef> | (TRef["modifier"] extends `${string}${ListTypeModifierSuffix}` ? AssignableInputValue<TSchema, StripTailingListFromTypeSpecifier<TRef>>[] : (TRef extends InputInputObjectSpecifier ? AssignableInput<TSchema, InputFieldRecord<TSchema, TRef>> : never) | (TRef extends InputInferrableTypeSpecifier ? InferInputTypeRef<TSchema, TRef> : never));
291
+ type IsOptional$1<TSpecifier$1 extends InputTypeSpecifier> = TSpecifier$1["modifier"] extends `${string}?` ? true : TSpecifier$1["defaultValue"] extends AnyDefaultValue ? true : false;
292
+ 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]> };
293
+ type AssignableInputValue<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends InputTypeSpecifier> = GetAssignableType<InferInputProfile<TSchema, TSpecifier$1>>;
218
294
  //#endregion
219
295
  //#region packages/core/src/types/fragment/directives.d.ts
220
296
  type AnyDirectiveAttachments = {
221
297
  readonly [key: string]: AnyAssignableInput;
222
298
  };
223
299
  //#endregion
300
+ //#region packages/core/src/types/schema/const-assignable-input.d.ts
301
+ type AnyConstAssignableInputValue = ConstValue;
302
+ type AnyConstAssignableInput = {
303
+ readonly [key: string]: AnyConstAssignableInputValue;
304
+ };
305
+ type IsOptional<TSpecifier$1 extends InputTypeSpecifier> = TSpecifier$1["modifier"] extends `${string}?` ? true : TSpecifier$1["defaultValue"] extends AnyDefaultValue ? true : false;
306
+ 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]> };
307
+ type ConstAssignableInputValue<TSchema extends AnyGraphqlSchema, TSpecifier$1 extends InputTypeSpecifier> = GetConstAssignableType<InferInputProfile<TSchema, TSpecifier$1>> & {};
308
+ //#endregion
224
309
  //#region packages/core/src/types/fragment/field-selection.d.ts
225
310
  /**
226
311
  * Canonical representation of the field selections we collect during model and
@@ -249,17 +334,17 @@ type AnyFields = {
249
334
  readonly [alias: string]: AnyFieldSelection;
250
335
  };
251
336
  /** Resolve the data shape produced by a set of field selections. */
252
- type InferFields<TSchema extends AnyGraphqlSchema, TFields extends AnyFields> = Prettify<{ readonly [TAliasName in keyof TFields]: InferField<TSchema, TFields[TAliasName]> }>;
337
+ type InferFields<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields> = { [_ in TSchema["label"]]: { [TAliasName in keyof TFields$1]: InferField<TSchema, TFields$1[TAliasName]> } & {} }[TSchema["label"]];
253
338
  /** Resolve the data shape for a single field reference, including nested objects/unions. */
254
339
  type InferField<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection> = (TSelection extends {
255
- type: infer TRef extends OutputObjectSpecifier;
340
+ type: infer TSpecifier extends OutputObjectSpecifier;
256
341
  object: infer TNested extends AnyNestedObject;
257
- } ? ApplyTypeModifier<TRef["modifier"], InferFields<TSchema, TNested>> : never) | (TSelection extends {
258
- type: infer TRef extends OutputUnionSpecifier;
342
+ } ? ApplyTypeModifier<InferFields<TSchema, TNested>, TSpecifier["modifier"]> : never) | (TSelection extends {
343
+ type: infer TSpecifier extends OutputUnionSpecifier;
259
344
  union: infer TNested extends AnyNestedUnion;
260
- } ? ApplyTypeModifier<TRef["modifier"], { [TTypename in keyof TNested]: undefined extends TNested[TTypename] ? never : InferFields<TSchema, NonNullable<TNested[TTypename]>> }[keyof TNested]> : never) | (TSelection extends {
261
- type: infer TRef extends OutputInferrableTypeSpecifier;
262
- } ? InferOutputTypeRef<TSchema, TRef> : never);
345
+ } ? ApplyTypeModifier<{ [TTypename in keyof TNested]: undefined extends TNested[TTypename] ? never : InferFields<TSchema, NonNullable<TNested[TTypename]>> }[keyof TNested], TSpecifier["modifier"]> : never) | (TSelection extends {
346
+ type: infer TSpecifier extends OutputInferrableTypeSpecifier;
347
+ } ? GetModifiedType<InferOutputProfile<TSchema, TSpecifier>, TSpecifier["modifier"]> : never);
263
348
  //#endregion
264
349
  //#region packages/core/src/types/fragment/field-path.d.ts
265
350
  type AnyFieldPath = string;
@@ -267,22 +352,17 @@ type AnyFieldPath = string;
267
352
  * Computes strongly typed "$.foo.bar" style selectors for a set of fields so
268
353
  * slice result transforms can reference response paths safely.
269
354
  */
270
- type AvailableFieldPathOf<TSchema extends AnyGraphqlSchema, TFields extends AnyFields> = AvailableFieldPathsInner<TSchema, TFields, "$">;
355
+ type AvailableFieldPathOf<TSchema extends AnyGraphqlSchema, TFields$1 extends AnyFields> = AvailableFieldPathsInner<TSchema, TFields$1, "$">;
271
356
  /** Recursive helper used to build path strings for nested selections. */
272
- type AvailableFieldPathsInner<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TCurr extends AnyFieldPath> = { readonly [TAliasName in keyof TFields & string]: `${TCurr}.${TAliasName}` | (TFields[TAliasName] extends {
357
+ 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 {
273
358
  object: infer TNested extends AnyNestedObject;
274
- } ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields & string];
359
+ } ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields$1 & string];
275
360
  /** Resolve the TypeScript type located at a given field path. */
276
- type InferByFieldPath<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TPath extends AnyFieldPath> = string extends keyof TFields ? any : TPath extends "$" ? never : InferByFieldPathInner<TSchema, TFields, TPath, "$">;
361
+ 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, "$">;
277
362
  /** Internal helper that walks a field tree while matching a path literal. */
278
- type InferByFieldPathInner<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TPathTarget extends AnyFieldPath, TPathCurrent extends AnyFieldPath> = { readonly [TAliasName in keyof TFields]: TAliasName extends string ? `${TPathCurrent}.${TAliasName}` extends TPathTarget ? InferField<TSchema, TFields[TAliasName]> : TFields[TAliasName] extends {
363
+ 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 {
279
364
  object: infer TNested extends AnyNestedObject;
280
- } ? InferByFieldPathInner<TSchema, TNested, TPathTarget, `${TPathCurrent}.${TAliasName}`> : never : never }[keyof TFields];
281
- //#endregion
282
- //#region packages/core/src/utils/type-utils.d.ts
283
- type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
284
- type Tuple<T> = [T, ...T[]];
285
- type StripFunctions<T extends object> = { [K in keyof T as T[K] extends ((...args: any[]) => any) ? never : K]: T[K] };
365
+ } ? InferByFieldPathInner<TSchema, TNested, TPathTarget, `${TPathCurrent}.${TAliasName}`> : never : never }[keyof TFields$1];
286
366
  //#endregion
287
367
  //#region packages/core/src/types/runtime/runtime-adapter.d.ts
288
368
  /**
@@ -402,28 +482,28 @@ declare const __EMPTY_SYMBOL__: unique symbol;
402
482
  type EmptyObject = {
403
483
  readonly [__EMPTY_SYMBOL__]: never;
404
484
  };
405
- type IsEmptyObject<T> = keyof (T & EmptyObject) extends keyof EmptyObject ? true : false;
485
+ type IsEmptyObject<T$1> = keyof (T$1 & EmptyObject) extends keyof EmptyObject ? true : false;
406
486
  type SwitchIfEmpty<TTarget, TTrue, TFalse> = IsEmptyObject<TTarget> extends true ? TTrue : TFalse;
407
487
  //#endregion
408
488
  //#region packages/core/src/types/element/slice.d.ts
409
489
  type AnySliceOf<TOperationType extends OperationType> = Slice<TOperationType, any, AnyFields, AnyProjection>;
410
- type SliceDefinition<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TProjection extends AnyProjection> = {
490
+ type SliceDefinition<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> = {
411
491
  readonly operationType: TOperationType;
412
- readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields, TProjection>;
492
+ readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
413
493
  };
414
494
  declare const __OPERATION_SLICE_BRAND__: unique symbol;
415
- declare class Slice<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TProjection extends AnyProjection> extends GqlElement<SliceDefinition<TOperationType, TVariables, TFields, TProjection>> implements SliceDefinition<TOperationType, TVariables, TFields, TProjection> {
495
+ declare class Slice<TOperationType extends OperationType, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> extends GqlElement<SliceDefinition<TOperationType, TVariables, TFields$1, TProjection>> implements SliceDefinition<TOperationType, TVariables, TFields$1, TProjection> {
416
496
  readonly [__OPERATION_SLICE_BRAND__]: Hidden<{
417
497
  operationType: TOperationType;
418
498
  output: InferExecutionResultProjection<TProjection>;
419
499
  }>;
420
500
  private constructor();
421
501
  get operationType(): TOperationType;
422
- get embed(): (variables: TVariables) => SlicePayload<TVariables, TFields, TProjection>;
423
- static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields, TProjection extends AnyProjection>(define: () => {
502
+ get embed(): (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
503
+ static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields, TProjection extends AnyProjection>(define: () => {
424
504
  operationType: TOperationType;
425
- embed: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => SlicePayload<SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields, TProjection>;
426
- }): Slice<TOperationType, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields & {
505
+ embed: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => SlicePayload<SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1, TProjection>;
506
+ }): Slice<TOperationType, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1 & {
427
507
  [key: symbol]: never;
428
508
  }, TProjection>;
429
509
  }
@@ -431,9 +511,9 @@ type AnySlicePayloads = {
431
511
  [key: string]: AnySlicePayload;
432
512
  };
433
513
  type AnySlicePayload = SlicePayload<AnyAssignableInput | void, AnyFields, AnyProjection>;
434
- type SlicePayload<TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TProjection extends AnyProjection> = {
514
+ type SlicePayload<TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TProjection extends AnyProjection> = {
435
515
  variables: TVariables;
436
- getFields: () => TFields;
516
+ getFields: () => TFields$1;
437
517
  projection: TProjection;
438
518
  };
439
519
  //#endregion
@@ -466,7 +546,7 @@ declare class ComposedOperation<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter
466
546
  projectionPathGraph: ProjectionPathGraphNode;
467
547
  document: TypedDocumentNode<InferComposedOperationRawData<TSchema, TSliceFragments>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
468
548
  parse: (result: NormalizedExecutionResult<TRuntimeAdapter, InferComposedOperationRawData<TSchema, TSliceFragments>, any>) => { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> };
469
- }): ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, ((ConcatSlicePayloads<TSliceFragments> extends infer T_2 extends AnyFields ? { readonly [TAliasName in keyof T_2]: InferField<TSchema_1, T_2[TAliasName]> } : never) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never) extends infer T ? { [K in keyof T]: T[K] } : never, { [K_2 in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K_2]["projection"]> }>;
549
+ }): ComposedOperation<TRuntimeAdapter, TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, InferComposedOperationRawData<TSchema, TSliceFragments>, { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> }>;
470
550
  }
471
551
  type ProjectionPathGraphNode = {
472
552
  readonly matches: {
@@ -478,30 +558,30 @@ type ProjectionPathGraphNode = {
478
558
  readonly [segment: string]: ProjectionPathGraphNode;
479
559
  };
480
560
  };
481
- type ConcatSlicePayloads<TSlicePayloads extends AnySlicePayloads> = Prettify<UnionToIntersection<{ [TLabel in keyof TSlicePayloads & string]: TSlicePayloads[TLabel] extends {
561
+ type ConcatSlicePayloads<TSlicePayloads extends AnySlicePayloads> = UnionToIntersection<{ [TLabel in keyof TSlicePayloads & string]: TSlicePayloads[TLabel] extends {
482
562
  getFields: () => infer TFields;
483
- } ? { [K in keyof TFields & string as `${TLabel}_${K}`]: TFields[K] } : {} }[keyof TSlicePayloads & string]>> & AnyFields;
484
- type InferComposedOperationRawData<TSchema extends AnyGraphqlSchema, TSlicePayloads extends AnySlicePayloads> = Prettify<InferFields<TSchema, ConcatSlicePayloads<TSlicePayloads>>>;
563
+ } ? { [K in keyof TFields & string as `${TLabel}_${K}`]: TFields[K] } : {} }[keyof TSlicePayloads & string]> & AnyFields;
564
+ type InferComposedOperationRawData<TSchema extends AnyGraphqlSchema, TSlicePayloads extends AnySlicePayloads> = InferFields<TSchema, ConcatSlicePayloads<TSlicePayloads>>;
485
565
  //#endregion
486
566
  //#region packages/core/src/types/element/execution-result-projection-builder.d.ts
487
567
  type AnyExecutionResultProjectionsBuilder = ExecutionResultProjectionsBuilder<AnyGraphqlSchema, AnyGraphqlRuntimeAdapter, any, any>;
488
- type ExecutionResultProjectionsBuilder<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields extends AnyFields, TProjection extends AnyProjection> = (tools: {
489
- select: ResultSelector<TSchema, TRuntimeAdapter, TFields>;
568
+ type ExecutionResultProjectionsBuilder<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields$1 extends AnyFields, TProjection extends AnyProjection> = (tools: {
569
+ select: ResultSelector<TSchema, TRuntimeAdapter, TFields$1>;
490
570
  }) => TProjection;
491
- type ResultSelector<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields extends AnyFields> = <TPaths extends Tuple<AvailableFieldPathOf<TSchema, TFields>>, TProjected>(paths: TPaths, projector: (result: NoInfer<SlicedExecutionResult<InferByResultSelectorPaths<TSchema, TFields, TPaths>, TRuntimeAdapter>>) => TProjected) => NoInfer<Projection<TProjected>>;
492
- type InferByResultSelectorPaths<TSchema extends AnyGraphqlSchema, TFields extends AnyFields, TPaths extends Tuple<AvailableFieldPathOf<TSchema, TFields>>> = TPaths extends string[] ? { [K in keyof TPaths]: TPaths[K] extends string ? InferByFieldPath<TSchema, TFields, TPaths[K]> : never } : never;
571
+ 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>>;
572
+ 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;
493
573
  //#endregion
494
574
  //#region packages/core/src/types/element/inline-operation.d.ts
495
575
  type AnyInlineOperationOf<TOperationType extends OperationType> = InlineOperation<TOperationType, string, string[], any, AnyFields, any>;
496
576
  declare const __INLINE_OPERATION_BRAND__: unique symbol;
497
- type InlineOperationArtifact<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields extends Partial<AnyFields>, TData extends object> = {
577
+ type InlineOperationArtifact<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields$1 extends Partial<AnyFields>, TData extends object> = {
498
578
  readonly operationType: TOperationType;
499
579
  readonly operationName: TOperationName;
500
580
  readonly variableNames: TVariableNames;
501
- readonly documentSource: () => TFields;
581
+ readonly documentSource: () => TFields$1;
502
582
  readonly document: TypedDocumentNode<TData, TVariables>;
503
583
  };
504
- declare class InlineOperation<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields extends Partial<AnyFields>, TData extends object> extends GqlElement<InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields, TData>> implements InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields, TData> {
584
+ declare class InlineOperation<TOperationType extends OperationType, TOperationName extends string, TVariableNames extends string[], TVariables extends AnyConstAssignableInput, TFields$1 extends Partial<AnyFields>, TData extends object> extends GqlElement<InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields$1, TData>> implements InlineOperationArtifact<TOperationType, TOperationName, TVariableNames, TVariables, TFields$1, TData> {
505
585
  readonly [__INLINE_OPERATION_BRAND__]: Hidden<{
506
586
  operationType: TOperationType;
507
587
  }>;
@@ -509,41 +589,41 @@ declare class InlineOperation<TOperationType extends OperationType, TOperationNa
509
589
  get operationType(): TOperationType;
510
590
  get operationName(): TOperationName;
511
591
  get variableNames(): TVariableNames;
512
- get documentSource(): () => TFields;
592
+ get documentSource(): () => TFields$1;
513
593
  get document(): TypedDocumentNode<TData, TVariables>;
514
- static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields>(define: (context: GqlElementContext | null) => {
594
+ static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields>(define: (context: GqlElementContext | null) => {
515
595
  operationType: TOperationType;
516
596
  operationName: TOperationName;
517
597
  variableNames: (keyof TVariableDefinitions & string)[];
518
- documentSource: () => TFields;
519
- document: TypedDocumentNode<InferFields<TSchema, TFields>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
520
- }): InlineOperation<TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, TFields, { [K in keyof { readonly [TAliasName in keyof TFields]: InferField<TSchema, TFields[TAliasName]> }]: { readonly [TAliasName in keyof TFields]: InferField<TSchema, TFields[TAliasName]> }[K] }>;
598
+ documentSource: () => TFields$1;
599
+ document: TypedDocumentNode<InferFields<TSchema, TFields$1>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
600
+ }): InlineOperation<TOperationType, TOperationName, (keyof TVariableDefinitions & string)[], ConstAssignableInput<TSchema, TVariableDefinitions>, TFields$1, InferFields<TSchema, TFields$1>>;
521
601
  }
522
602
  //#endregion
523
603
  //#region packages/core/src/types/element/model.d.ts
524
604
  type AnyModel = Model<string, any, AnyFields, any, any>;
525
- type ModelArtifact<TTypeName extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> = {
526
- readonly typename: TTypeName;
527
- readonly fragment: (variables: TVariables) => TFields;
605
+ interface ModelArtifact<TTypeName$1 extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> {
606
+ readonly typename: TTypeName$1;
607
+ readonly fragment: (variables: TVariables) => TFields$1;
528
608
  readonly normalize: (raw: TRaw) => TNormalized;
529
- };
609
+ }
530
610
  declare const __MODEL_BRAND__: unique symbol;
531
- declare class Model<TTypeName extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> extends GqlElement<ModelArtifact<TTypeName, TVariables, TFields, TRaw, TNormalized>> implements ModelArtifact<TTypeName, TVariables, TFields, TRaw, TNormalized> {
611
+ declare class Model<TTypeName$1 extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields$1 extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> extends GqlElement<ModelArtifact<TTypeName$1, TVariables, TFields$1, TRaw, TNormalized>> implements ModelArtifact<TTypeName$1, TVariables, TFields$1, TRaw, TNormalized> {
532
612
  readonly [__MODEL_BRAND__]: Hidden<{
533
613
  input: TVariables;
534
614
  output: TNormalized;
535
615
  }>;
536
616
  private constructor();
537
- get typename(): TTypeName;
538
- get fragment(): (variables: TVariables) => TFields;
617
+ get typename(): TTypeName$1;
618
+ get fragment(): (variables: TVariables) => TFields$1;
539
619
  get normalize(): (raw: TRaw) => TNormalized;
540
- static create<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields, TNormalized extends object>(define: () => {
541
- typename: TTypeName;
542
- fragment: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => TFields;
543
- normalize: (raw: NoInfer<InferFields<TSchema, TFields>>) => TNormalized;
544
- }): Model<TTypeName, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields & {
620
+ static create<TSchema extends AnyGraphqlSchema, TTypeName$1 extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields, TNormalized extends object>(define: () => {
621
+ typename: TTypeName$1;
622
+ fragment: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => TFields$1;
623
+ normalize: (raw: NoInfer<InferFields<TSchema, TFields$1>>) => TNormalized;
624
+ }): Model<TTypeName$1, SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields$1 & {
545
625
  [key: symbol]: never;
546
- }, { [K in keyof { readonly [TAliasName in keyof TFields]: InferField<TSchema, TFields[TAliasName]> }]: { readonly [TAliasName in keyof TFields]: InferField<TSchema, TFields[TAliasName]> }[K] } & {
626
+ }, InferFields<TSchema, TFields$1> & {
547
627
  [key: symbol]: never;
548
628
  }, TNormalized>;
549
629
  }
@@ -584,7 +664,7 @@ type RuntimeSliceInput = {
584
664
  //#endregion
585
665
  //#region packages/core/src/runtime/runtime-adapter.d.ts
586
666
  type RuntimeAdapterFactory<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> = (tools: {
587
- type: <T>() => Hidden<T>;
667
+ type: <T$1>() => Hidden<T$1>;
588
668
  }) => TRuntimeAdapter;
589
669
  declare const createRuntimeAdapter: <TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>(factory: RuntimeAdapterFactory<TRuntimeAdapter>) => TRuntimeAdapter;
590
670
  //#endregion