@soda-gql/core 0.0.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +247 -0
  2. package/dist/adapter.cjs +35 -0
  3. package/dist/adapter.cjs.map +1 -0
  4. package/dist/adapter.d.cts +35 -0
  5. package/dist/adapter.d.cts.map +1 -0
  6. package/dist/adapter.d.ts +35 -0
  7. package/dist/adapter.d.ts.map +1 -0
  8. package/dist/adapter.js +34 -0
  9. package/dist/adapter.js.map +1 -0
  10. package/dist/index-B-erotAZ.d.cts +657 -0
  11. package/dist/index-B-erotAZ.d.cts.map +1 -0
  12. package/dist/index-Djr9A4KL.d.ts +657 -0
  13. package/dist/index-Djr9A4KL.d.ts.map +1 -0
  14. package/dist/index.cjs +450 -348
  15. package/dist/index.cjs.map +1 -0
  16. package/dist/index.d.cts +88 -2
  17. package/dist/index.d.cts.map +1 -0
  18. package/dist/index.d.ts +88 -2
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +420 -323
  21. package/dist/index.js.map +1 -1
  22. package/dist/runtime.cjs +85 -0
  23. package/dist/runtime.cjs.map +1 -0
  24. package/dist/runtime.d.cts +40 -0
  25. package/dist/runtime.d.cts.map +1 -0
  26. package/dist/runtime.d.ts +40 -0
  27. package/dist/runtime.d.ts.map +1 -0
  28. package/dist/runtime.js +82 -0
  29. package/dist/runtime.js.map +1 -0
  30. package/dist/schema-Bip7o0g3.cjs +128 -0
  31. package/dist/schema-Bip7o0g3.cjs.map +1 -0
  32. package/dist/schema-BygZwEX8.d.ts +494 -0
  33. package/dist/schema-BygZwEX8.d.ts.map +1 -0
  34. package/dist/schema-D9wIW5Dl.js +86 -0
  35. package/dist/schema-D9wIW5Dl.js.map +1 -0
  36. package/dist/schema-DRkKucYe.d.cts +494 -0
  37. package/dist/schema-DRkKucYe.d.cts.map +1 -0
  38. package/dist/schema-builder-8zadflz-.d.cts +40 -0
  39. package/dist/schema-builder-8zadflz-.d.cts.map +1 -0
  40. package/dist/schema-builder-vwQtCGYI.d.ts +40 -0
  41. package/dist/schema-builder-vwQtCGYI.d.ts.map +1 -0
  42. package/package.json +34 -7
  43. package/dist/index-CFNJ_Aa6.d.ts +0 -1185
  44. package/dist/index-CFNJ_Aa6.d.ts.map +0 -1
  45. package/dist/index-DHh8XRal.d.cts +0 -1185
  46. package/dist/index-DHh8XRal.d.cts.map +0 -1
  47. package/dist/runtime/index.cjs +0 -105
  48. package/dist/runtime/index.d.cts +0 -71
  49. package/dist/runtime/index.d.cts.map +0 -1
  50. package/dist/runtime/index.d.ts +0 -71
  51. package/dist/runtime/index.d.ts.map +0 -1
  52. package/dist/runtime/index.js +0 -102
  53. package/dist/runtime/index.js.map +0 -1
  54. package/dist/slice-DlVY4UJG.cjs +0 -333
  55. package/dist/slice-ua5mSfhV.js +0 -256
  56. package/dist/slice-ua5mSfhV.js.map +0 -1
@@ -0,0 +1,82 @@
1
+ //#region packages/core/src/utils/hidden.ts
2
+ const _dummy = () => {
3
+ throw new Error("DO NOT CALL THIS FUNCTION -- we use function to safely transfer type information");
4
+ };
5
+ const hidden = () => _dummy;
6
+
7
+ //#endregion
8
+ //#region packages/core/src/runtime/fragment.ts
9
+ const createRuntimeFragment = (input) => {
10
+ const fragment = {
11
+ typename: input.prebuild.typename,
12
+ embed: hidden(),
13
+ attach(attachment) {
14
+ const value = attachment.createValue(fragment);
15
+ Object.defineProperty(fragment, attachment.name, { get() {
16
+ return value;
17
+ } });
18
+ return fragment;
19
+ }
20
+ };
21
+ return fragment;
22
+ };
23
+
24
+ //#endregion
25
+ //#region packages/core/src/runtime/runtime-registry.ts
26
+ const operationRegistry = /* @__PURE__ */ new Map();
27
+ const registerOperation = (operation) => {
28
+ operationRegistry.set(operation.operationName, operation);
29
+ };
30
+ const getOperation = (name) => {
31
+ const operation = operationRegistry.get(name);
32
+ if (!operation) throw new Error(`Operation ${name} not found`);
33
+ return operation;
34
+ };
35
+ /**
36
+ * Test-only function to reset the operation registry
37
+ * @internal
38
+ */
39
+ const __resetRuntimeRegistry = () => {
40
+ operationRegistry.clear();
41
+ };
42
+ /**
43
+ * Test-only function to get all registered operations
44
+ * @internal
45
+ */
46
+ const __getRegisteredOperations = () => {
47
+ return operationRegistry;
48
+ };
49
+
50
+ //#endregion
51
+ //#region packages/core/src/runtime/operation.ts
52
+ const createRuntimeOperation = (input) => {
53
+ const operation = {
54
+ operationType: input.prebuild.operationType,
55
+ operationName: input.prebuild.operationName,
56
+ variableNames: input.prebuild.variableNames,
57
+ documentSource: hidden(),
58
+ document: input.prebuild.document,
59
+ metadata: input.prebuild.metadata,
60
+ attach(attachment) {
61
+ const value = attachment.createValue(operation);
62
+ Object.defineProperty(operation, attachment.name, { get() {
63
+ return value;
64
+ } });
65
+ return operation;
66
+ }
67
+ };
68
+ registerOperation(operation);
69
+ return operation;
70
+ };
71
+
72
+ //#endregion
73
+ //#region packages/core/src/runtime/index.ts
74
+ const gqlRuntime = {
75
+ fragment: createRuntimeFragment,
76
+ operation: createRuntimeOperation,
77
+ getOperation
78
+ };
79
+
80
+ //#endregion
81
+ export { __getRegisteredOperations, __resetRuntimeRegistry, gqlRuntime };
82
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","names":[],"sources":["../src/utils/hidden.ts","../src/runtime/fragment.ts","../src/runtime/runtime-registry.ts","../src/runtime/operation.ts","../src/runtime/index.ts"],"sourcesContent":["const _dummy = () => {\n throw new Error(\"DO NOT CALL THIS FUNCTION -- we use function to safely transfer type information\");\n};\nexport const hidden = <T>(): (() => T) => _dummy;\nexport type Hidden<T> = () => T;\n","import type { AnyFragment, GqlElementAttachment } from \"../types/element\";\nimport { hidden } from \"../utils/hidden\";\nimport type { StripFunctions, StripSymbols } from \"../utils/type-utils\";\n\nexport type RuntimeFragmentInput = {\n prebuild: StripFunctions<AnyFragment>;\n};\n\nexport const createRuntimeFragment = (input: RuntimeFragmentInput): AnyFragment => {\n const fragment = {\n typename: input.prebuild.typename,\n embed: hidden(),\n attach<TName extends string, TValue extends object>(attachment: GqlElementAttachment<typeof fragment, TName, TValue>) {\n const value = attachment.createValue(fragment);\n\n Object.defineProperty(fragment, attachment.name, {\n get() {\n return value;\n },\n });\n\n return fragment as typeof fragment & { [_ in TName]: TValue };\n },\n } satisfies StripSymbols<AnyFragment> as unknown as AnyFragment;\n\n return fragment;\n};\n","import type { AnyOperationOf } from \"../types/element\";\nimport type { OperationType } from \"../types/schema\";\n\nconst operationRegistry = new Map<string, AnyOperationOf<OperationType>>();\n\nexport const registerOperation = (operation: AnyOperationOf<OperationType>) => {\n operationRegistry.set(operation.operationName, operation);\n};\n\nexport const getOperation = (name: string) => {\n const operation = operationRegistry.get(name);\n if (!operation) {\n throw new Error(`Operation ${name} not found`);\n }\n return operation;\n};\n\n/**\n * Test-only function to reset the operation registry\n * @internal\n */\nexport const __resetRuntimeRegistry = () => {\n operationRegistry.clear();\n};\n\n/**\n * Test-only function to get all registered operations\n * @internal\n */\nexport const __getRegisteredOperations = (): ReadonlyMap<string, AnyOperationOf<OperationType>> => {\n return operationRegistry;\n};\n","import type { AnyOperationOf, GqlElementAttachment } from \"../types/element\";\nimport type { OperationType } from \"../types/schema\";\nimport { hidden } from \"../utils/hidden\";\nimport type { StripFunctions, StripSymbols } from \"../utils/type-utils\";\nimport { registerOperation } from \"./runtime-registry\";\n\nexport type RuntimeOperationInput = {\n prebuild: StripFunctions<AnyOperationOf<OperationType>>;\n /**\n * Reserved for future runtime configuration injection.\n * Currently always an empty object, but kept for forward compatibility\n * with potential features like runtime variable injection or context.\n */\n runtime: {};\n};\n\nexport const createRuntimeOperation = (input: RuntimeOperationInput): AnyOperationOf<OperationType> => {\n const operation = {\n operationType: input.prebuild.operationType,\n operationName: input.prebuild.operationName,\n variableNames: input.prebuild.variableNames,\n documentSource: hidden(),\n document: input.prebuild.document,\n metadata: input.prebuild.metadata,\n attach<TName extends string, TValue extends object>(attachment: GqlElementAttachment<typeof operation, TName, TValue>) {\n const value = attachment.createValue(operation);\n\n Object.defineProperty(operation, attachment.name, {\n get() {\n return value;\n },\n });\n\n return operation as typeof operation & { [_ in TName]: TValue };\n },\n } satisfies StripSymbols<AnyOperationOf<OperationType>> as AnyOperationOf<OperationType>;\n\n registerOperation(operation);\n\n return operation;\n};\n","import { createRuntimeFragment } from \"./fragment\";\nimport { createRuntimeOperation } from \"./operation\";\nimport { getOperation } from \"./runtime-registry\";\n\nexport type { RuntimeFragmentInput } from \"./fragment\";\nexport type { RuntimeOperationInput } from \"./operation\";\nexport { __getRegisteredOperations, __resetRuntimeRegistry } from \"./runtime-registry\";\n\nexport const gqlRuntime = {\n fragment: createRuntimeFragment,\n operation: createRuntimeOperation,\n getOperation,\n};\n"],"mappings":";AAAA,MAAM,eAAe;AACnB,OAAM,IAAI,MAAM,mFAAmF;;AAErG,MAAa,eAA6B;;;;ACK1C,MAAa,yBAAyB,UAA6C;CACjF,MAAM,WAAW;EACf,UAAU,MAAM,SAAS;EACzB,OAAO,QAAQ;EACf,OAAoD,YAAkE;GACpH,MAAM,QAAQ,WAAW,YAAY,SAAS;AAE9C,UAAO,eAAe,UAAU,WAAW,MAAM,EAC/C,MAAM;AACJ,WAAO;MAEV,CAAC;AAEF,UAAO;;EAEV;AAED,QAAO;;;;;ACtBT,MAAM,oCAAoB,IAAI,KAA4C;AAE1E,MAAa,qBAAqB,cAA6C;AAC7E,mBAAkB,IAAI,UAAU,eAAe,UAAU;;AAG3D,MAAa,gBAAgB,SAAiB;CAC5C,MAAM,YAAY,kBAAkB,IAAI,KAAK;AAC7C,KAAI,CAAC,UACH,OAAM,IAAI,MAAM,aAAa,KAAK,YAAY;AAEhD,QAAO;;;;;;AAOT,MAAa,+BAA+B;AAC1C,mBAAkB,OAAO;;;;;;AAO3B,MAAa,kCAAsF;AACjG,QAAO;;;;;ACdT,MAAa,0BAA0B,UAAgE;CACrG,MAAM,YAAY;EAChB,eAAe,MAAM,SAAS;EAC9B,eAAe,MAAM,SAAS;EAC9B,eAAe,MAAM,SAAS;EAC9B,gBAAgB,QAAQ;EACxB,UAAU,MAAM,SAAS;EACzB,UAAU,MAAM,SAAS;EACzB,OAAoD,YAAmE;GACrH,MAAM,QAAQ,WAAW,YAAY,UAAU;AAE/C,UAAO,eAAe,WAAW,WAAW,MAAM,EAChD,MAAM;AACJ,WAAO;MAEV,CAAC;AAEF,UAAO;;EAEV;AAED,mBAAkB,UAAU;AAE5B,QAAO;;;;;AC/BT,MAAa,aAAa;CACxB,UAAU;CACV,WAAW;CACX;CACD"}
@@ -0,0 +1,128 @@
1
+
2
+ //#region packages/core/src/utils/type-meta.ts
3
+ const withTypeMeta = (target) => {
4
+ if (process.env.NODE_ENV !== "production") {
5
+ if (typeof target !== "object" && typeof target !== "function" || target === null) throw new Error("Target must be an object or a function.");
6
+ Object.defineProperty(target, "$type", { get() {
7
+ throw new Error("This property is only for type inference. Do not access this property directly.");
8
+ } });
9
+ }
10
+ return target;
11
+ };
12
+
13
+ //#endregion
14
+ //#region packages/core/src/utils/wrap-by-key.ts
15
+ function wrapByKey(name, value) {
16
+ return { [name]: value };
17
+ }
18
+
19
+ //#endregion
20
+ //#region packages/core/src/types/type-foundation/modified-type-name.ts
21
+ function parseModifiedTypeName(nameAndModifier) {
22
+ if (typeof nameAndModifier !== "string") throw new Error(`Invalid modified type name: ${nameAndModifier}`);
23
+ const [name, modifier] = nameAndModifier.split(":");
24
+ return {
25
+ name,
26
+ modifier
27
+ };
28
+ }
29
+
30
+ //#endregion
31
+ //#region packages/core/src/schema/type-specifier-builder.ts
32
+ const createUnsafeInputTypeSpecifierFactory = (kind) => {
33
+ return (type, extras) => ({
34
+ kind,
35
+ ...parseModifiedTypeName(type),
36
+ defaultValue: extras.default ? { default: extras.default() } : null
37
+ });
38
+ };
39
+ const unsafeInputType = {
40
+ scalar: createUnsafeInputTypeSpecifierFactory("scalar"),
41
+ enum: createUnsafeInputTypeSpecifierFactory("enum"),
42
+ input: createUnsafeInputTypeSpecifierFactory("input")
43
+ };
44
+ const createUnsafeOutputTypeSpecifierFactory = (kind) => {
45
+ return (type, extras) => ({
46
+ kind,
47
+ ...parseModifiedTypeName(type),
48
+ arguments: extras.arguments ?? {}
49
+ });
50
+ };
51
+ const unsafeOutputType = {
52
+ scalar: createUnsafeOutputTypeSpecifierFactory("scalar"),
53
+ enum: createUnsafeOutputTypeSpecifierFactory("enum"),
54
+ object: createUnsafeOutputTypeSpecifierFactory("object"),
55
+ union: createUnsafeOutputTypeSpecifierFactory("union"),
56
+ typename: createUnsafeOutputTypeSpecifierFactory("typename")
57
+ };
58
+
59
+ //#endregion
60
+ //#region packages/core/src/schema/schema-builder.ts
61
+ const defineScalar = (name) => wrapByKey(name, withTypeMeta({ name }));
62
+ const define = (name) => ({
63
+ enum: (values) => withTypeMeta({
64
+ name,
65
+ values
66
+ }),
67
+ input: (fields) => ({
68
+ name,
69
+ fields
70
+ }),
71
+ object: (fields) => ({
72
+ name,
73
+ fields: {
74
+ __typename: unsafeOutputType.typename(`${name}:!`, {}),
75
+ ...fields
76
+ }
77
+ }),
78
+ union: (types) => ({
79
+ name,
80
+ types
81
+ })
82
+ });
83
+ const defineOperationRoots = (operationRoots) => operationRoots;
84
+
85
+ //#endregion
86
+ Object.defineProperty(exports, 'define', {
87
+ enumerable: true,
88
+ get: function () {
89
+ return define;
90
+ }
91
+ });
92
+ Object.defineProperty(exports, 'defineOperationRoots', {
93
+ enumerable: true,
94
+ get: function () {
95
+ return defineOperationRoots;
96
+ }
97
+ });
98
+ Object.defineProperty(exports, 'defineScalar', {
99
+ enumerable: true,
100
+ get: function () {
101
+ return defineScalar;
102
+ }
103
+ });
104
+ Object.defineProperty(exports, 'parseModifiedTypeName', {
105
+ enumerable: true,
106
+ get: function () {
107
+ return parseModifiedTypeName;
108
+ }
109
+ });
110
+ Object.defineProperty(exports, 'unsafeInputType', {
111
+ enumerable: true,
112
+ get: function () {
113
+ return unsafeInputType;
114
+ }
115
+ });
116
+ Object.defineProperty(exports, 'unsafeOutputType', {
117
+ enumerable: true,
118
+ get: function () {
119
+ return unsafeOutputType;
120
+ }
121
+ });
122
+ Object.defineProperty(exports, 'wrapByKey', {
123
+ enumerable: true,
124
+ get: function () {
125
+ return wrapByKey;
126
+ }
127
+ });
128
+ //# sourceMappingURL=schema-Bip7o0g3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-Bip7o0g3.cjs","names":[],"sources":["../src/utils/type-meta.ts","../src/utils/wrap-by-key.ts","../src/types/type-foundation/modified-type-name.ts","../src/schema/type-specifier-builder.ts","../src/schema/schema-builder.ts"],"sourcesContent":["export interface WithTypeMeta<T extends object> {\n readonly $type: T;\n}\n\nexport const withTypeMeta = <TTarget extends WithTypeMeta<TTypeMeta>, TTypeMeta extends object>(\n target: Omit<NoInfer<TTarget>, \"$type\">,\n): TTarget => {\n if (process.env.NODE_ENV !== \"production\") {\n if ((typeof target !== \"object\" && typeof target !== \"function\") || target === null) {\n throw new Error(\"Target must be an object or a function.\");\n }\n\n Object.defineProperty(target, \"$type\", {\n get() {\n throw new Error(\"This property is only for type inference. Do not access this property directly.\");\n },\n });\n }\n\n return target as TTarget;\n};\n","export function wrapByKey<TName extends string, TValue>(name: TName, value: TValue) {\n return {\n [name]: value,\n } as {\n [K in TName]: TValue;\n };\n}\n","import type { TypeModifier, ValidTypeModifier } from \"./type-modifier-core.generated\";\n\nexport type ModifiedTypeName<\n // Wrapping by array to avoid type distribution\n TNameCandidate extends [string],\n TName extends TNameCandidate[0],\n TModifier extends TypeModifier,\n> = [string] extends TNameCandidate // For abstract implementation\n ? `${TName}:${TModifier}`\n : TNameCandidate extends [TName]\n ? // First, user inputs TName based on TNameCandidate\n NoInfer<`${TNameCandidate[0]}`> | (TName & NoInfer<TypeModifier extends TModifier ? never : string>)\n : // With valid TName, user can input TModifier based on TypeModifierNS.ValidTypeModifier\n `${TName}:${TModifier & ValidTypeModifier}`;\n\nexport function parseModifiedTypeName<TNameCandidate extends [string], TName extends string, TModifier extends TypeModifier>(\n nameAndModifier: ModifiedTypeName<TNameCandidate, TName, TModifier>,\n) {\n if (typeof nameAndModifier !== \"string\") {\n throw new Error(`Invalid modified type name: ${nameAndModifier}`);\n }\n\n const [name, modifier] = nameAndModifier.split(\":\") as [TName, TModifier];\n return { name, modifier };\n}\n","import type { AnyConstDirectiveAttachments } from \"../types/schema\";\nimport {\n type AnyTypeSpecifier,\n type InputTypeKind,\n type InputTypeSpecifiers,\n type ModifiedTypeName,\n type OutputTypeKind,\n parseModifiedTypeName,\n type TypeModifier,\n} from \"../types/type-foundation\";\nimport type { ConstValue } from \"../types/type-foundation/const-value\";\n\nconst createUnsafeInputTypeSpecifierFactory = <const TKind extends InputTypeKind>(kind: TKind) => {\n type UnsafeInputTypeSpecifier<\n TName extends string,\n TModifier extends TypeModifier,\n TDefaultFactory extends (() => ConstValue) | null,\n TDirectives extends AnyConstDirectiveAttachments,\n > = {\n kind: TKind;\n name: TName;\n modifier: TModifier;\n defaultValue: TDefaultFactory extends null ? null : { default: ReturnType<NonNullable<TDefaultFactory>> };\n directives: TDirectives;\n };\n\n return <\n const TName extends string,\n const TModifier extends TypeModifier,\n const TDefaultFactory extends (() => ConstValue) | null = null,\n const TDirectives extends AnyConstDirectiveAttachments = {},\n >(\n type: ModifiedTypeName<[string], TName, TModifier>,\n extras: {\n default?: TDefaultFactory;\n directives?: TDirectives;\n },\n ): UnsafeInputTypeSpecifier<TName, TModifier, TDefaultFactory, TDirectives> =>\n ({\n kind,\n ...parseModifiedTypeName(type),\n defaultValue: extras.default ? { default: extras.default() } : null,\n }) satisfies AnyTypeSpecifier as UnsafeInputTypeSpecifier<TName, TModifier, TDefaultFactory, TDirectives>;\n};\n\nexport const unsafeInputType = {\n scalar: createUnsafeInputTypeSpecifierFactory(\"scalar\"),\n enum: createUnsafeInputTypeSpecifierFactory(\"enum\"),\n input: createUnsafeInputTypeSpecifierFactory(\"input\"),\n};\n\nconst createUnsafeOutputTypeSpecifierFactory = <const TKind extends OutputTypeKind>(kind: TKind) => {\n type UnsafeOutputTypeSpecifier<TName extends string, TModifier extends TypeModifier, TArguments extends InputTypeSpecifiers> = {\n kind: TKind;\n name: TName;\n modifier: TModifier;\n arguments: TArguments;\n };\n\n return <const TName extends string, const TModifier extends TypeModifier, const TArguments extends InputTypeSpecifiers = {}>(\n type: ModifiedTypeName<[string], TName, TModifier>,\n extras: {\n arguments?: TArguments;\n },\n ): UnsafeOutputTypeSpecifier<TName, TModifier, InputTypeSpecifiers extends TArguments ? {} : TArguments> =>\n ({\n kind,\n ...parseModifiedTypeName(type),\n arguments: extras.arguments ?? ({} as TArguments),\n }) satisfies AnyTypeSpecifier as UnsafeOutputTypeSpecifier<\n TName,\n TModifier,\n InputTypeSpecifiers extends TArguments ? {} : TArguments\n >;\n};\n\nexport const unsafeOutputType = {\n scalar: createUnsafeOutputTypeSpecifierFactory(\"scalar\"),\n enum: createUnsafeOutputTypeSpecifierFactory(\"enum\"),\n object: createUnsafeOutputTypeSpecifierFactory(\"object\"),\n union: createUnsafeOutputTypeSpecifierFactory(\"union\"),\n typename: createUnsafeOutputTypeSpecifierFactory(\"typename\"),\n};\n","import type {\n EnumDefinition,\n InputDefinition,\n ObjectDefinition,\n OperationRoots,\n ScalarDefinition,\n UnionDefinition,\n} from \"../types/schema\";\nimport { withTypeMeta } from \"../utils/type-meta\";\nimport { wrapByKey } from \"../utils/wrap-by-key\";\nimport { unsafeOutputType } from \"./type-specifier-builder\";\n\nexport const defineScalar = <const TName extends string, TInput, TOutput>(name: NoInfer<TName>) =>\n wrapByKey(\n name,\n withTypeMeta({ name }) satisfies ScalarDefinition<{\n name: TName;\n input: TInput;\n output: TOutput;\n }>,\n );\n\nexport const define = <const TName extends string>(name: TName) => ({\n enum: <const TValues extends EnumDefinition<{ name: TName; values: string }>[\"values\"]>(values: TValues) =>\n withTypeMeta({ name, values }) satisfies EnumDefinition<{\n name: TName;\n values: Extract<keyof TValues, string>;\n }>,\n\n input: <TFields extends InputDefinition[\"fields\"]>(fields: TFields) =>\n ({\n name,\n fields,\n }) satisfies InputDefinition,\n\n object: <TFields extends ObjectDefinition[\"fields\"]>(fields: TFields) =>\n ({\n name,\n fields: {\n __typename: unsafeOutputType.typename(`${name}:!`, {}),\n ...fields,\n },\n }) satisfies ObjectDefinition,\n\n union: <TTypes extends UnionDefinition[\"types\"]>(types: TTypes) =>\n ({\n name,\n types,\n }) satisfies UnionDefinition,\n});\n\nexport const defineOperationRoots = <const TOperationRoots extends OperationRoots>(operationRoots: TOperationRoots) =>\n operationRoots;\n"],"mappings":";;AAIA,MAAa,gBACX,WACY;AACZ,KAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,MAAK,OAAO,WAAW,YAAY,OAAO,WAAW,cAAe,WAAW,KAC7E,OAAM,IAAI,MAAM,0CAA0C;AAG5D,SAAO,eAAe,QAAQ,SAAS,EACrC,MAAM;AACJ,SAAM,IAAI,MAAM,kFAAkF;KAErG,CAAC;;AAGJ,QAAO;;;;;ACnBT,SAAgB,UAAwC,MAAa,OAAe;AAClF,QAAO,GACJ,OAAO,OACT;;;;;ACYH,SAAgB,sBACd,iBACA;AACA,KAAI,OAAO,oBAAoB,SAC7B,OAAM,IAAI,MAAM,+BAA+B,kBAAkB;CAGnE,MAAM,CAAC,MAAM,YAAY,gBAAgB,MAAM,IAAI;AACnD,QAAO;EAAE;EAAM;EAAU;;;;;ACX3B,MAAM,yCAA4E,SAAgB;AAchG,SAME,MACA,YAKC;EACC;EACA,GAAG,sBAAsB,KAAK;EAC9B,cAAc,OAAO,UAAU,EAAE,SAAS,OAAO,SAAS,EAAE,GAAG;EAChE;;AAGL,MAAa,kBAAkB;CAC7B,QAAQ,sCAAsC,SAAS;CACvD,MAAM,sCAAsC,OAAO;CACnD,OAAO,sCAAsC,QAAQ;CACtD;AAED,MAAM,0CAA8E,SAAgB;AAQlG,SACE,MACA,YAIC;EACC;EACA,GAAG,sBAAsB,KAAK;EAC9B,WAAW,OAAO,aAAc,EAAE;EACnC;;AAOL,MAAa,mBAAmB;CAC9B,QAAQ,uCAAuC,SAAS;CACxD,MAAM,uCAAuC,OAAO;CACpD,QAAQ,uCAAuC,SAAS;CACxD,OAAO,uCAAuC,QAAQ;CACtD,UAAU,uCAAuC,WAAW;CAC7D;;;;ACtED,MAAa,gBAA6D,SACxE,UACE,MACA,aAAa,EAAE,MAAM,CAAC,CAKvB;AAEH,MAAa,UAAsC,UAAiB;CAClE,OAAwF,WACtF,aAAa;EAAE;EAAM;EAAQ,CAAC;CAKhC,QAAmD,YAChD;EACC;EACA;EACD;CAEH,SAAqD,YAClD;EACC;EACA,QAAQ;GACN,YAAY,iBAAiB,SAAS,GAAG,KAAK,KAAK,EAAE,CAAC;GACtD,GAAG;GACJ;EACF;CAEH,QAAiD,WAC9C;EACC;EACA;EACD;CACJ;AAED,MAAa,wBAAsE,mBACjF"}