@soda-gql/runtime 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
- import { FormattedExecutionResult, GraphQLFormattedError, TypedQueryDocumentNode } from "graphql";
1
+ import { TypedDocumentNode } from "@graphql-typed-document-node/core";
2
+ import { FormattedExecutionResult, GraphQLFormattedError } from "graphql";
2
3
 
3
4
  //#region packages/core/src/types/element/gql-element.d.ts
4
5
  declare const GQL_ELEMENT_FACTORY: unique symbol;
@@ -6,7 +7,7 @@ declare const GQL_ELEMENT_CONTEXT: unique symbol;
6
7
  type GqlElementContext = {
7
8
  canonicalId: string;
8
9
  };
9
- type GqlElementDefinitionFactory<T> = (context: GqlElementContext | null) => T;
10
+ type GqlElementDefinitionFactory<T$1> = (context: GqlElementContext | null) => T$1;
10
11
  declare abstract class GqlElement<TDefinition> {
11
12
  private [GQL_ELEMENT_FACTORY];
12
13
  private [GQL_ELEMENT_CONTEXT];
@@ -16,51 +17,166 @@ declare abstract class GqlElement<TDefinition> {
16
17
  static get<TValue>(element: GqlElement<TValue>): TValue;
17
18
  }
18
19
  //#endregion
19
- //#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
20
29
  type ConstValue = string | number | boolean | null | undefined | {
21
30
  readonly [key: string]: ConstValue;
22
31
  } | readonly ConstValue[];
23
32
  //#endregion
24
- //#region packages/core/src/utils/hidden.d.ts
25
- type Hidden<T> = () => T;
26
- //#endregion
27
- //#region packages/core/src/types/schema/type-modifier.d.ts
28
- type TypeModifier = "?" | `!${string}` | `[]${string}`;
29
- type ListTypeModifierSuffix = "[]" | "[]!";
30
- type StripTailingListFromTypeModifier<TModifier extends TypeModifier> = TModifier extends `${infer TInner extends TypeModifier}${ListTypeModifierSuffix}` ? TInner : TModifier;
31
- 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;
32
- type ApplyTypeModifierToKeys<T extends {
33
- [key: string]: {
34
- 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>;
35
93
  };
36
- }> = { 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>;
37
99
  //#endregion
38
- //#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
39
165
  type AnyDefaultValue = {
40
166
  default: ConstValue;
41
167
  };
42
168
  type InputTypeKind = "scalar" | "enum" | "input";
43
169
  type OutputTypeKind = "scalar" | "enum" | "object" | "union" | "typename";
44
- type AnyTypeSpecifier = {
45
- readonly kind: string;
46
- readonly name: string;
47
- readonly modifier: TypeModifier;
48
- readonly directives: AnyConstDirectiveAttachments;
49
- readonly defaultValue?: AnyDefaultValue | null;
50
- readonly arguments?: InputTypeSpecifiers;
51
- };
52
170
  type AbstractInputTypeSpecifier<TKind extends InputTypeKind> = {
53
171
  readonly kind: TKind;
54
172
  readonly name: string;
55
173
  readonly modifier: TypeModifier;
56
- readonly directives: AnyConstDirectiveAttachments;
57
174
  readonly defaultValue: AnyDefaultValue | null;
58
175
  };
59
176
  type InputTypeSpecifiers = {
60
177
  [key: string]: InputTypeSpecifier;
61
178
  };
62
179
  type InputTypeSpecifier = InputScalarSpecifier | InputEnumSpecifier | InputInputObjectSpecifier;
63
- type InputInferrableTypeSpecifier = InputScalarSpecifier | InputEnumSpecifier;
64
180
  type InputScalarSpecifier = AbstractInputTypeSpecifier<"scalar">;
65
181
  type InputEnumSpecifier = AbstractInputTypeSpecifier<"enum">;
66
182
  type InputInputObjectSpecifier = AbstractInputTypeSpecifier<"input">;
@@ -68,7 +184,6 @@ type AbstractOutputTypeSpecifier<TKind extends OutputTypeKind> = {
68
184
  readonly kind: TKind;
69
185
  readonly name: string;
70
186
  readonly modifier: TypeModifier;
71
- readonly directives: AnyConstDirectiveAttachments;
72
187
  readonly arguments: InputTypeSpecifiers;
73
188
  };
74
189
  type OutputTypeSpecifiers = {
@@ -81,42 +196,13 @@ type OutputEnumSpecifier = AbstractOutputTypeSpecifier<"enum">;
81
196
  type OutputObjectSpecifier = AbstractOutputTypeSpecifier<"object">;
82
197
  type OutputUnionSpecifier = AbstractOutputTypeSpecifier<"union">;
83
198
  type OutputTypenameSpecifier = AbstractOutputTypeSpecifier<"typename">;
84
- type StripTailingListFromTypeSpecifier<TTypeSpecifier extends AnyTypeSpecifier> = TTypeSpecifier extends {
85
- defaultValue: AnyDefaultValue | null;
86
- } ? {
87
- readonly kind: TTypeSpecifier["kind"];
88
- readonly name: TTypeSpecifier["name"];
89
- readonly modifier: StripTailingListFromTypeModifier<TTypeSpecifier["modifier"]>;
90
- readonly directives: TTypeSpecifier["directives"];
91
- readonly defaultValue: TTypeSpecifier["modifier"] extends `${string}${ListTypeModifierSuffix}` ? null : TTypeSpecifier["defaultValue"];
92
- } : TTypeSpecifier extends {
93
- arguments: InputTypeSpecifiers;
94
- } ? {
95
- readonly kind: TTypeSpecifier["kind"];
96
- readonly name: TTypeSpecifier["name"];
97
- readonly modifier: StripTailingListFromTypeModifier<TTypeSpecifier["modifier"]>;
98
- readonly directives: TTypeSpecifier["directives"];
99
- readonly arguments: TTypeSpecifier["arguments"];
100
- } : never;
101
- //#endregion
102
- //#region packages/core/src/types/schema/const-assignable-input.d.ts
103
- type AnyConstAssignableInputValue = ConstValue;
104
- type AnyConstAssignableInput = {
105
- readonly [key: string]: AnyConstAssignableInputValue;
106
- };
107
- type ConstAssignableInput<TSchema extends AnyGraphqlSchema, TRefs extends InputTypeSpecifiers> = { readonly [K in keyof ApplyTypeModifierToKeys<TRefs>]: ConstAssignableInputValue<TSchema, TRefs[K]> };
108
- 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);
109
- //#endregion
110
- //#region packages/core/src/types/schema/const-directives.d.ts
111
- type AnyConstDirectiveAttachments = {
112
- readonly [key: string]: AnyConstAssignableInputValue;
113
- };
114
199
  //#endregion
115
200
  //#region packages/core/src/types/schema/schema.d.ts
116
201
  type OperationType = keyof OperationRoots;
117
202
  type AnyTypeName = string;
118
203
  type AnyFieldName = string;
119
204
  type AnyGraphqlSchema = {
205
+ readonly label: string;
120
206
  readonly operations: OperationRoots;
121
207
  readonly scalar: {
122
208
  readonly [name: string]: ScalarDefinition<any>;
@@ -139,71 +225,61 @@ type OperationRoots = {
139
225
  readonly mutation: string | null;
140
226
  readonly subscription: string | null;
141
227
  };
142
- type ScalarDefinition<T extends {
228
+ interface ScalarDefinition<T$1 extends {
229
+ name: string;
143
230
  input: unknown;
144
231
  output: unknown;
145
- }> = {
146
- readonly _type: Hidden<{
147
- input: T["input"];
148
- output: T["output"];
149
- }>;
150
- readonly name: string;
151
- readonly directives: AnyConstDirectiveAttachments;
152
- };
153
- type EnumDefinition<T extends string> = {
154
- readonly _type: Hidden<T>;
155
- readonly name: string;
156
- readonly values: { readonly [_ in T]: true };
157
- readonly directives: AnyConstDirectiveAttachments;
158
- };
159
- 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 {
160
268
  readonly name: string;
161
269
  readonly fields: InputTypeSpecifiers;
162
- readonly directives: AnyConstDirectiveAttachments;
163
- };
270
+ }
164
271
  type ObjectDefinition = {
165
272
  readonly name: string;
166
273
  readonly fields: OutputTypeSpecifiers;
167
- readonly directives: AnyConstDirectiveAttachments;
168
274
  };
169
275
  type UnionDefinition = {
170
276
  readonly name: string;
171
277
  readonly types: {
172
278
  [typename: string]: true;
173
279
  };
174
- readonly directives: AnyConstDirectiveAttachments;
175
280
  };
176
- type InferInputTypeRef<TSchema extends AnyGraphqlSchema, TSpecifier extends InputInferrableTypeSpecifier> = (TSpecifier extends {
177
- defaultValue: null;
178
- } ? 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);
179
- 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;
180
- type InputFieldRecord<TSchema extends AnyGraphqlSchema, TSpecifier extends InputTypeSpecifier> = TSchema["input"][TSpecifier["name"]]["fields"];
181
- //#endregion
182
- //#region packages/core/src/utils/prettify.d.ts
183
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
184
- //#endregion
185
- //#region packages/core/src/types/fragment/var-ref.d.ts
186
- /** Nominal reference placeholder used inside `AnyVariableAssignments`. */
187
- type AnyVarRef = VarRef<any>;
188
- type AnyVarRefMeta = {
189
- readonly kind: string;
190
- readonly name: string;
191
- readonly modifier: unknown;
192
- };
193
- type VarRefBy<TRef extends InputTypeSpecifier> = VarRef<VarRefMetaBy<TRef>>;
194
- type VarRefMetaBy<TRef extends InputTypeSpecifier> = Prettify<{
195
- readonly kind: TRef["kind"];
196
- readonly name: TRef["name"];
197
- readonly modifier: ApplyTypeModifier<TRef["modifier"], "_"> | (TRef["defaultValue"] extends AnyDefaultValue ? null | undefined : never);
198
- }>;
199
- declare const __VAR_REF_BRAND__: unique symbol;
200
- /** Nominal reference used to defer variable binding while carrying type info. */
201
- declare class VarRef<TMeta extends AnyVarRefMeta> {
202
- readonly name: string;
203
- readonly [__VAR_REF_BRAND__]: Hidden<TMeta>;
204
- private constructor();
205
- static create<TRef extends InputTypeSpecifier>(name: string): VarRefBy<TRef>;
206
- }
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"]];
207
283
  //#endregion
208
284
  //#region packages/core/src/types/fragment/assignable-input.d.ts
209
285
  type AnyAssignableInputValue = ConstValue | AnyVarRef | {
@@ -212,14 +288,24 @@ type AnyAssignableInputValue = ConstValue | AnyVarRef | {
212
288
  type AnyAssignableInput = {
213
289
  readonly [key: string]: AnyAssignableInputValue;
214
290
  };
215
- type AssignableInput<TSchema extends AnyGraphqlSchema, TRefs extends InputTypeSpecifiers> = { readonly [K in keyof ApplyTypeModifierToKeys<TRefs>]: AssignableInputValue<TSchema, TRefs[K]> };
216
- 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>>;
217
294
  //#endregion
218
295
  //#region packages/core/src/types/fragment/directives.d.ts
219
296
  type AnyDirectiveAttachments = {
220
297
  readonly [key: string]: AnyAssignableInput;
221
298
  };
222
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
223
309
  //#region packages/core/src/types/fragment/field-selection.d.ts
224
310
  /**
225
311
  * Canonical representation of the field selections we collect during model and
@@ -248,17 +334,17 @@ type AnyFields = {
248
334
  readonly [alias: string]: AnyFieldSelection;
249
335
  };
250
336
  /** Resolve the data shape produced by a set of field selections. */
251
- 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"]];
252
338
  /** Resolve the data shape for a single field reference, including nested objects/unions. */
253
339
  type InferField<TSchema extends AnyGraphqlSchema, TSelection extends AnyFieldSelection> = (TSelection extends {
254
- type: infer TRef extends OutputObjectSpecifier;
340
+ type: infer TSpecifier extends OutputObjectSpecifier;
255
341
  object: infer TNested extends AnyNestedObject;
256
- } ? ApplyTypeModifier<TRef["modifier"], InferFields<TSchema, TNested>> : never) | (TSelection extends {
257
- type: infer TRef extends OutputUnionSpecifier;
342
+ } ? ApplyTypeModifier<InferFields<TSchema, TNested>, TSpecifier["modifier"]> : never) | (TSelection extends {
343
+ type: infer TSpecifier extends OutputUnionSpecifier;
258
344
  union: infer TNested extends AnyNestedUnion;
259
- } ? ApplyTypeModifier<TRef["modifier"], { [TTypename in keyof TNested]: undefined extends TNested[TTypename] ? never : InferFields<TSchema, NonNullable<TNested[TTypename]>> }[keyof TNested]> : never) | (TSelection extends {
260
- type: infer TRef extends OutputInferrableTypeSpecifier;
261
- } ? 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);
262
348
  //#endregion
263
349
  //#region packages/core/src/types/fragment/field-path.d.ts
264
350
  type AnyFieldPath = string;
@@ -266,22 +352,17 @@ type AnyFieldPath = string;
266
352
  * Computes strongly typed "$.foo.bar" style selectors for a set of fields so
267
353
  * slice result transforms can reference response paths safely.
268
354
  */
269
- 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, "$">;
270
356
  /** Recursive helper used to build path strings for nested selections. */
271
- 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 {
272
358
  object: infer TNested extends AnyNestedObject;
273
- } ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields & string];
359
+ } ? AvailableFieldPathsInner<TSchema, TNested, `${TCurr}.${TAliasName}`> : never) }[keyof TFields$1 & string];
274
360
  /** Resolve the TypeScript type located at a given field path. */
275
- 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, "$">;
276
362
  /** Internal helper that walks a field tree while matching a path literal. */
277
- 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 {
278
364
  object: infer TNested extends AnyNestedObject;
279
- } ? InferByFieldPathInner<TSchema, TNested, TPathTarget, `${TPathCurrent}.${TAliasName}`> : never : never }[keyof TFields];
280
- //#endregion
281
- //#region packages/core/src/utils/type-utils.d.ts
282
- type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
283
- type Tuple<T> = [T, ...T[]];
284
- 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];
285
366
  //#endregion
286
367
  //#region packages/core/src/types/runtime/runtime-adapter.d.ts
287
368
  /**
@@ -401,28 +482,28 @@ declare const __EMPTY_SYMBOL__: unique symbol;
401
482
  type EmptyObject = {
402
483
  readonly [__EMPTY_SYMBOL__]: never;
403
484
  };
404
- 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;
405
486
  type SwitchIfEmpty<TTarget, TTrue, TFalse> = IsEmptyObject<TTarget> extends true ? TTrue : TFalse;
406
487
  //#endregion
407
488
  //#region packages/core/src/types/element/slice.d.ts
408
489
  type AnySliceOf<TOperationType extends OperationType> = Slice<TOperationType, any, AnyFields, AnyProjection>;
409
- 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> = {
410
491
  readonly operationType: TOperationType;
411
- readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields, TProjection>;
492
+ readonly embed: (variables: TVariables) => SlicePayload<TVariables, TFields$1, TProjection>;
412
493
  };
413
494
  declare const __OPERATION_SLICE_BRAND__: unique symbol;
414
- 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> {
415
496
  readonly [__OPERATION_SLICE_BRAND__]: Hidden<{
416
497
  operationType: TOperationType;
417
498
  output: InferExecutionResultProjection<TProjection>;
418
499
  }>;
419
500
  private constructor();
420
501
  get operationType(): TOperationType;
421
- get embed(): (variables: TVariables) => SlicePayload<TVariables, TFields, TProjection>;
422
- 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: () => {
423
504
  operationType: TOperationType;
424
- embed: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => SlicePayload<SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>, TFields, TProjection>;
425
- }): 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 & {
426
507
  [key: symbol]: never;
427
508
  }, TProjection>;
428
509
  }
@@ -430,9 +511,9 @@ type AnySlicePayloads = {
430
511
  [key: string]: AnySlicePayload;
431
512
  };
432
513
  type AnySlicePayload = SlicePayload<AnyAssignableInput | void, AnyFields, AnyProjection>;
433
- 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> = {
434
515
  variables: TVariables;
435
- getFields: () => TFields;
516
+ getFields: () => TFields$1;
436
517
  projection: TProjection;
437
518
  };
438
519
  //#endregion
@@ -444,7 +525,7 @@ type ComposedOperationDefinition<TRuntimeAdapter extends AnyGraphqlRuntimeAdapte
444
525
  readonly operationName: TOperationName;
445
526
  readonly variableNames: TVariableNames;
446
527
  readonly projectionPathGraph: ProjectionPathGraphNode;
447
- readonly document: TypedQueryDocumentNode<TRawData, TVariables>;
528
+ readonly document: TypedDocumentNode<TRawData, TVariables>;
448
529
  readonly parse: (result: NormalizedExecutionResult<TRuntimeAdapter, TRawData, any>) => TProjectedData;
449
530
  };
450
531
  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>> implements ComposedOperationDefinition<TRuntimeAdapter, TOperationType, TOperationName, TVariableNames, TVariables, TRawData, TProjectedData> {
@@ -456,16 +537,16 @@ declare class ComposedOperation<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter
456
537
  get operationName(): TOperationName;
457
538
  get variableNames(): TVariableNames;
458
539
  get projectionPathGraph(): ProjectionPathGraphNode;
459
- get document(): TypedQueryDocumentNode<TRawData, TVariables>;
540
+ get document(): TypedDocumentNode<TRawData, TVariables>;
460
541
  get parse(): (result: NormalizedExecutionResult<TRuntimeAdapter, TRawData, any>) => TProjectedData;
461
542
  static create<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TSliceFragments extends AnySlicePayloads>(define: (context: GqlElementContext | null) => {
462
543
  operationType: TOperationType;
463
544
  operationName: TOperationName;
464
545
  variableNames: (keyof TVariableDefinitions & string)[];
465
546
  projectionPathGraph: ProjectionPathGraphNode;
466
- document: TypedQueryDocumentNode<InferComposedOperationRawData<TSchema, TSliceFragments>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
547
+ document: TypedDocumentNode<InferComposedOperationRawData<TSchema, TSliceFragments>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
467
548
  parse: (result: NormalizedExecutionResult<TRuntimeAdapter, InferComposedOperationRawData<TSchema, TSliceFragments>, any>) => { [K in keyof TSliceFragments]: InferExecutionResultProjection<TSliceFragments[K]["projection"]> };
468
- }): 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"]> }>;
469
550
  }
470
551
  type ProjectionPathGraphNode = {
471
552
  readonly matches: {
@@ -477,30 +558,30 @@ type ProjectionPathGraphNode = {
477
558
  readonly [segment: string]: ProjectionPathGraphNode;
478
559
  };
479
560
  };
480
- 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 {
481
562
  getFields: () => infer TFields;
482
- } ? { [K in keyof TFields & string as `${TLabel}_${K}`]: TFields[K] } : {} }[keyof TSlicePayloads & string]>> & AnyFields;
483
- 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>>;
484
565
  //#endregion
485
566
  //#region packages/core/src/types/element/execution-result-projection-builder.d.ts
486
567
  type AnyExecutionResultProjectionsBuilder = ExecutionResultProjectionsBuilder<AnyGraphqlSchema, AnyGraphqlRuntimeAdapter, any, any>;
487
- type ExecutionResultProjectionsBuilder<TSchema extends AnyGraphqlSchema, TRuntimeAdapter extends AnyGraphqlRuntimeAdapter, TFields extends AnyFields, TProjection extends AnyProjection> = (tools: {
488
- 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>;
489
570
  }) => TProjection;
490
- 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>>;
491
- 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;
492
573
  //#endregion
493
574
  //#region packages/core/src/types/element/inline-operation.d.ts
494
575
  type AnyInlineOperationOf<TOperationType extends OperationType> = InlineOperation<TOperationType, string, string[], any, AnyFields, any>;
495
576
  declare const __INLINE_OPERATION_BRAND__: unique symbol;
496
- 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> = {
497
578
  readonly operationType: TOperationType;
498
579
  readonly operationName: TOperationName;
499
580
  readonly variableNames: TVariableNames;
500
- readonly documentSource: () => TFields;
501
- readonly document: TypedQueryDocumentNode<TData, TVariables>;
581
+ readonly documentSource: () => TFields$1;
582
+ readonly document: TypedDocumentNode<TData, TVariables>;
502
583
  };
503
- 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> {
504
585
  readonly [__INLINE_OPERATION_BRAND__]: Hidden<{
505
586
  operationType: TOperationType;
506
587
  }>;
@@ -508,41 +589,41 @@ declare class InlineOperation<TOperationType extends OperationType, TOperationNa
508
589
  get operationType(): TOperationType;
509
590
  get operationName(): TOperationName;
510
591
  get variableNames(): TVariableNames;
511
- get documentSource(): () => TFields;
512
- get document(): TypedQueryDocumentNode<TData, TVariables>;
513
- static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields>(define: (context: GqlElementContext | null) => {
592
+ get documentSource(): () => TFields$1;
593
+ get document(): TypedDocumentNode<TData, TVariables>;
594
+ static create<TSchema extends AnyGraphqlSchema, TOperationType extends OperationType, TOperationName extends string, TVariableDefinitions extends InputTypeSpecifiers, TFields$1 extends AnyFields>(define: (context: GqlElementContext | null) => {
514
595
  operationType: TOperationType;
515
596
  operationName: TOperationName;
516
597
  variableNames: (keyof TVariableDefinitions & string)[];
517
- documentSource: () => TFields;
518
- document: TypedQueryDocumentNode<InferFields<TSchema, TFields>, ConstAssignableInput<TSchema, TVariableDefinitions>>;
519
- }): 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>>;
520
601
  }
521
602
  //#endregion
522
603
  //#region packages/core/src/types/element/model.d.ts
523
604
  type AnyModel = Model<string, any, AnyFields, any, any>;
524
- type ModelArtifact<TTypeName extends string, TVariables extends Partial<AnyAssignableInput> | void, TFields extends Partial<AnyFields>, TRaw extends object, TNormalized extends object> = {
525
- readonly typename: TTypeName;
526
- 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;
527
608
  readonly normalize: (raw: TRaw) => TNormalized;
528
- };
609
+ }
529
610
  declare const __MODEL_BRAND__: unique symbol;
530
- 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> {
531
612
  readonly [__MODEL_BRAND__]: Hidden<{
532
613
  input: TVariables;
533
614
  output: TNormalized;
534
615
  }>;
535
616
  private constructor();
536
- get typename(): TTypeName;
537
- get fragment(): (variables: TVariables) => TFields;
617
+ get typename(): TTypeName$1;
618
+ get fragment(): (variables: TVariables) => TFields$1;
538
619
  get normalize(): (raw: TRaw) => TNormalized;
539
- static create<TSchema extends AnyGraphqlSchema, TTypeName extends keyof TSchema["object"] & string, TVariableDefinitions extends InputTypeSpecifiers, TFields extends AnyFields, TNormalized extends object>(define: () => {
540
- typename: TTypeName;
541
- fragment: (variables: SwitchIfEmpty<TVariableDefinitions, void, AssignableInput<TSchema, TVariableDefinitions>>) => TFields;
542
- normalize: (raw: NoInfer<InferFields<TSchema, TFields>>) => TNormalized;
543
- }): 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 & {
544
625
  [key: symbol]: never;
545
- }, { [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> & {
546
627
  [key: symbol]: never;
547
628
  }, TNormalized>;
548
629
  }
@@ -583,7 +664,7 @@ type RuntimeSliceInput = {
583
664
  //#endregion
584
665
  //#region packages/core/src/runtime/runtime-adapter.d.ts
585
666
  type RuntimeAdapterFactory<TRuntimeAdapter extends AnyGraphqlRuntimeAdapter> = (tools: {
586
- type: <T>() => Hidden<T>;
667
+ type: <T$1>() => Hidden<T$1>;
587
668
  }) => TRuntimeAdapter;
588
669
  declare const createRuntimeAdapter: <TRuntimeAdapter extends AnyGraphqlRuntimeAdapter>(factory: RuntimeAdapterFactory<TRuntimeAdapter>) => TRuntimeAdapter;
589
670
  //#endregion