@soda-gql/core 0.9.0 → 0.10.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 (54) hide show
  1. package/README.md +67 -0
  2. package/dist/adapter.cjs +52 -5
  3. package/dist/adapter.cjs.map +1 -1
  4. package/dist/adapter.d.cts +52 -5
  5. package/dist/adapter.d.cts.map +1 -1
  6. package/dist/adapter.d.ts +52 -5
  7. package/dist/adapter.d.ts.map +1 -1
  8. package/dist/adapter.js +51 -4
  9. package/dist/adapter.js.map +1 -1
  10. package/dist/{index-wkJ6KSwK.d.ts → index-CHshzPrG.d.cts} +343 -66
  11. package/dist/index-CHshzPrG.d.cts.map +1 -0
  12. package/dist/{schema-2qqtKss4.d.ts → index-CnQ5XVCf.d.ts} +371 -300
  13. package/dist/index-CnQ5XVCf.d.ts.map +1 -0
  14. package/dist/{schema-CPTxQbTv.d.cts → index-DnLzk2bC.d.cts} +371 -300
  15. package/dist/index-DnLzk2bC.d.cts.map +1 -0
  16. package/dist/{index-Ib9pb2Si.d.cts → index-J050RXPw.d.ts} +343 -66
  17. package/dist/index-J050RXPw.d.ts.map +1 -0
  18. package/dist/index.cjs +425 -67
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +4 -125
  21. package/dist/index.d.cts.map +1 -1
  22. package/dist/index.d.ts +4 -125
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +408 -61
  25. package/dist/index.js.map +1 -1
  26. package/dist/runtime.cjs +4 -0
  27. package/dist/runtime.cjs.map +1 -1
  28. package/dist/runtime.d.cts +13 -3
  29. package/dist/runtime.d.cts.map +1 -1
  30. package/dist/runtime.d.ts +13 -3
  31. package/dist/runtime.d.ts.map +1 -1
  32. package/dist/runtime.js +4 -0
  33. package/dist/runtime.js.map +1 -1
  34. package/dist/schema-builder-C9Qj5zQg.js +58 -0
  35. package/dist/schema-builder-C9Qj5zQg.js.map +1 -0
  36. package/dist/schema-builder-CJe30s_R.d.ts +63 -0
  37. package/dist/schema-builder-CJe30s_R.d.ts.map +1 -0
  38. package/dist/schema-builder-CwRmtxHx.d.cts +63 -0
  39. package/dist/schema-builder-CwRmtxHx.d.cts.map +1 -0
  40. package/dist/schema-builder-D2ay11cE.cjs +82 -0
  41. package/dist/schema-builder-D2ay11cE.cjs.map +1 -0
  42. package/package.json +1 -1
  43. package/dist/index-Ib9pb2Si.d.cts.map +0 -1
  44. package/dist/index-wkJ6KSwK.d.ts.map +0 -1
  45. package/dist/schema-2qqtKss4.d.ts.map +0 -1
  46. package/dist/schema-BiYcVVvm.js +0 -171
  47. package/dist/schema-BiYcVVvm.js.map +0 -1
  48. package/dist/schema-CPTxQbTv.d.cts.map +0 -1
  49. package/dist/schema-D2MW4DOF.cjs +0 -207
  50. package/dist/schema-D2MW4DOF.cjs.map +0 -1
  51. package/dist/schema-builder-BYJd50o2.d.cts +0 -97
  52. package/dist/schema-builder-BYJd50o2.d.cts.map +0 -1
  53. package/dist/schema-builder-Dhss2O1I.d.ts +0 -97
  54. package/dist/schema-builder-Dhss2O1I.d.ts.map +0 -1
@@ -1,97 +0,0 @@
1
- import { _ as ScalarDefinition, a as EnumDefinition, d as ObjectDefinition, l as InputDefinition, p as OperationRoots, v as UnionDefinition } from "./schema-CPTxQbTv.cjs";
2
-
3
- //#region packages/core/src/schema/schema-builder.d.ts
4
-
5
- /**
6
- * Defines a custom scalar type with input/output type mappings.
7
- *
8
- * @template TName - The scalar name (e.g., "DateTime", "JSON")
9
- * @template TInput - TypeScript type for input values
10
- * @template TOutput - TypeScript type for output values
11
- *
12
- * @example
13
- * ```typescript
14
- * const scalar = {
15
- * ...defineScalar<"DateTime", string, Date>("DateTime"),
16
- * ...defineScalar<"JSON", unknown, unknown>("JSON"),
17
- * };
18
- * ```
19
- */
20
- declare const defineScalar: <const TName extends string, TInput, TOutput>(name: NoInfer<TName>) => { [K in TName]: ScalarDefinition<{
21
- name: TName;
22
- input: TInput;
23
- output: TOutput;
24
- }> };
25
- /**
26
- * Creates a type definition builder for enums, inputs, objects, or unions.
27
- *
28
- * @param name - The GraphQL type name
29
- * @returns Builder with `.enum()`, `.input()`, `.object()`, `.union()` methods
30
- *
31
- * @example
32
- * ```typescript
33
- * const object = {
34
- * User: define("User").object({
35
- * id: unsafeOutputType.scalar("ID:!", {}),
36
- * name: unsafeOutputType.scalar("String:!", {}),
37
- * }),
38
- * };
39
- * ```
40
- */
41
- declare const define: <const TName extends string>(name: TName) => {
42
- /**
43
- * Defines an enum type with specified values.
44
- */
45
- enum: <const TValues extends EnumDefinition<{
46
- name: TName;
47
- values: string;
48
- }>["values"]>(values: TValues) => EnumDefinition<{
49
- name: TName;
50
- values: Extract<keyof TValues, string>;
51
- }>;
52
- /**
53
- * Defines an input type with specified fields.
54
- */
55
- input: <TFields extends InputDefinition["fields"]>(fields: TFields) => {
56
- name: TName;
57
- fields: TFields;
58
- };
59
- /**
60
- * Defines an object type with specified fields.
61
- * Automatically adds `__typename` field.
62
- */
63
- object: <TFields extends ObjectDefinition["fields"]>(fields: TFields) => {
64
- name: TName;
65
- fields: {
66
- __typename: {
67
- kind: "typename";
68
- name: `${TName}`;
69
- modifier: "!";
70
- arguments: {};
71
- };
72
- } & TFields;
73
- };
74
- /**
75
- * Defines a union type with specified member types.
76
- */
77
- union: <TTypes extends UnionDefinition["types"]>(types: TTypes) => {
78
- name: TName;
79
- types: TTypes;
80
- };
81
- };
82
- /**
83
- * Defines the root operation types for the schema.
84
- *
85
- * @example
86
- * ```typescript
87
- * const operations = defineOperationRoots({
88
- * query: "Query",
89
- * mutation: "Mutation",
90
- * subscription: null, // or "Subscription"
91
- * });
92
- * ```
93
- */
94
- declare const defineOperationRoots: <const TOperationRoots extends OperationRoots>(operationRoots: TOperationRoots) => TOperationRoots;
95
- //#endregion
96
- export { defineOperationRoots as n, defineScalar as r, define as t };
97
- //# sourceMappingURL=schema-builder-BYJd50o2.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-builder-BYJd50o2.d.cts","names":[],"sources":["../src/schema/schema-builder.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AA0DA;;;;;;;;AAIyG,cA9B5F,YA8B4F,EAAA,CAAA,oBAAA,MAAA,EAAA,MAAA,EAAA,OAAA,CAAA,CAAA,IAAA,EA9BzB,OA8ByB,CA9BjB,KA8BiB,CAAA,EAAA,GAAA,QA9BX,KA8BW,GA9BX,gBA8BW,CAAA;EAS/E,IAAA,EAnCd,KAmCc;EAAmC,KAAA,EAlChD,MAkCgD;UAjC/C;;;;;;;;;;;;AA0Ed;;;;;;cAtDa,2CAA4C;;;;+BAI1B;UAAuB;;wBAA4C,YAAO;UAE7F;YACE,cAAc;;;;;0BAMF,mCAAmC;;;;;;;;2BAUlC,oCAAoC;;;;;;;;;;;;;;yBAYtC,iCAAiC;;;;;;;;;;;;;;;;;cAmB7C,qDAAsD,gCAAgC,oBAAe"}
@@ -1,97 +0,0 @@
1
- import { _ as ScalarDefinition, a as EnumDefinition, d as ObjectDefinition, l as InputDefinition, p as OperationRoots, v as UnionDefinition } from "./schema-2qqtKss4.js";
2
-
3
- //#region packages/core/src/schema/schema-builder.d.ts
4
-
5
- /**
6
- * Defines a custom scalar type with input/output type mappings.
7
- *
8
- * @template TName - The scalar name (e.g., "DateTime", "JSON")
9
- * @template TInput - TypeScript type for input values
10
- * @template TOutput - TypeScript type for output values
11
- *
12
- * @example
13
- * ```typescript
14
- * const scalar = {
15
- * ...defineScalar<"DateTime", string, Date>("DateTime"),
16
- * ...defineScalar<"JSON", unknown, unknown>("JSON"),
17
- * };
18
- * ```
19
- */
20
- declare const defineScalar: <const TName extends string, TInput, TOutput>(name: NoInfer<TName>) => { [K in TName]: ScalarDefinition<{
21
- name: TName;
22
- input: TInput;
23
- output: TOutput;
24
- }> };
25
- /**
26
- * Creates a type definition builder for enums, inputs, objects, or unions.
27
- *
28
- * @param name - The GraphQL type name
29
- * @returns Builder with `.enum()`, `.input()`, `.object()`, `.union()` methods
30
- *
31
- * @example
32
- * ```typescript
33
- * const object = {
34
- * User: define("User").object({
35
- * id: unsafeOutputType.scalar("ID:!", {}),
36
- * name: unsafeOutputType.scalar("String:!", {}),
37
- * }),
38
- * };
39
- * ```
40
- */
41
- declare const define: <const TName extends string>(name: TName) => {
42
- /**
43
- * Defines an enum type with specified values.
44
- */
45
- enum: <const TValues extends EnumDefinition<{
46
- name: TName;
47
- values: string;
48
- }>["values"]>(values: TValues) => EnumDefinition<{
49
- name: TName;
50
- values: Extract<keyof TValues, string>;
51
- }>;
52
- /**
53
- * Defines an input type with specified fields.
54
- */
55
- input: <TFields extends InputDefinition["fields"]>(fields: TFields) => {
56
- name: TName;
57
- fields: TFields;
58
- };
59
- /**
60
- * Defines an object type with specified fields.
61
- * Automatically adds `__typename` field.
62
- */
63
- object: <TFields extends ObjectDefinition["fields"]>(fields: TFields) => {
64
- name: TName;
65
- fields: {
66
- __typename: {
67
- kind: "typename";
68
- name: `${TName}`;
69
- modifier: "!";
70
- arguments: {};
71
- };
72
- } & TFields;
73
- };
74
- /**
75
- * Defines a union type with specified member types.
76
- */
77
- union: <TTypes extends UnionDefinition["types"]>(types: TTypes) => {
78
- name: TName;
79
- types: TTypes;
80
- };
81
- };
82
- /**
83
- * Defines the root operation types for the schema.
84
- *
85
- * @example
86
- * ```typescript
87
- * const operations = defineOperationRoots({
88
- * query: "Query",
89
- * mutation: "Mutation",
90
- * subscription: null, // or "Subscription"
91
- * });
92
- * ```
93
- */
94
- declare const defineOperationRoots: <const TOperationRoots extends OperationRoots>(operationRoots: TOperationRoots) => TOperationRoots;
95
- //#endregion
96
- export { defineOperationRoots as n, defineScalar as r, define as t };
97
- //# sourceMappingURL=schema-builder-Dhss2O1I.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-builder-Dhss2O1I.d.ts","names":[],"sources":["../src/schema/schema-builder.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AA0DA;;;;;;;;AAIyG,cA9B5F,YA8B4F,EAAA,CAAA,oBAAA,MAAA,EAAA,MAAA,EAAA,OAAA,CAAA,CAAA,IAAA,EA9BzB,OA8ByB,CA9BjB,KA8BiB,CAAA,EAAA,GAAA,QA9BX,KA8BW,GA9BX,gBA8BW,CAAA;EAS/E,IAAA,EAnCd,KAmCc;EAAmC,KAAA,EAlChD,MAkCgD;UAjC/C;;;;;;;;;;;;AA0Ed;;;;;;cAtDa,2CAA4C;;;;+BAI1B;UAAuB;;wBAA4C,YAAO;UAE7F;YACE,cAAc;;;;;0BAMF,mCAAmC;;;;;;;;2BAUlC,oCAAoC;;;;;;;;;;;;;;yBAYtC,iCAAiC;;;;;;;;;;;;;;;;;cAmB7C,qDAAsD,gCAAgC,oBAAe"}