@vladimirdev635/gql-codegen 0.0.97 → 0.0.98

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 (57) hide show
  1. package/actors/ts/formatters/eslint/index.d.ts +1 -1
  2. package/actors/ts/formatters/index.d.ts +1 -0
  3. package/actors/ts/formatters/index.js +1 -0
  4. package/actors/ts/formatters/oxfmt/formatter.d.ts +3 -0
  5. package/actors/ts/formatters/oxfmt/formatter.js +20 -0
  6. package/actors/ts/formatters/oxfmt/index.d.ts +2 -0
  7. package/actors/ts/formatters/oxfmt/index.js +1 -0
  8. package/actors/ts/formatters/oxfmt/types.d.ts +20 -0
  9. package/actors/ts/formatters/oxfmt/types.js +1 -0
  10. package/actors/ts/gql-client/actor.js +1 -1
  11. package/actors/ts/gql-client/generators/main.js +25 -21
  12. package/actors/ts/gql-client/index.d.ts +1 -1
  13. package/actors/ts/gql-client/index.js +1 -1
  14. package/actors/ts/gql-client-react/actor.js +1 -1
  15. package/actors/ts/gql-client-react/generators/main.js +20 -14
  16. package/actors/ts/gql-client-react/index.d.ts +1 -1
  17. package/actors/ts/gql-client-react/index.js +1 -1
  18. package/actors/ts/graphql/actor.js +1 -1
  19. package/actors/ts/graphql/generators/client/fragments.js +53 -31
  20. package/actors/ts/graphql/generators/client/main.js +5 -5
  21. package/actors/ts/graphql/generators/client/operations.js +29 -13
  22. package/actors/ts/graphql/generators/main.js +2 -2
  23. package/actors/ts/graphql/generators/server/enums.js +1 -1
  24. package/actors/ts/graphql/generators/server/inputs.js +11 -8
  25. package/actors/ts/graphql/generators/server/main.js +13 -10
  26. package/actors/ts/graphql/generators/server/objects.js +15 -11
  27. package/actors/ts/graphql/generators/server/scalars/additional.js +23 -5
  28. package/actors/ts/graphql/generators/server/scalars/index.d.ts +1 -1
  29. package/actors/ts/graphql/generators/server/scalars/index.js +1 -1
  30. package/actors/ts/graphql/generators/server/scalars/mapping.js +1 -1
  31. package/actors/ts/graphql/generators/server/shared.js +6 -4
  32. package/actors/ts/graphql/generators/server/unions.js +5 -5
  33. package/actors/ts/graphql/generators/shared.js +6 -6
  34. package/actors/ts/graphql/index.d.ts +1 -1
  35. package/actors/ts/graphql/index.js +1 -1
  36. package/actors/ts/utils.js +3 -3
  37. package/config.d.ts +0 -2
  38. package/index.d.ts +1 -1
  39. package/index.js +1 -1
  40. package/package.json +23 -21
  41. package/schema/client/argument.d.ts +2 -2
  42. package/schema/client/argument.js +3 -3
  43. package/schema/client/directive.d.ts +2 -2
  44. package/schema/client/directive.js +1 -1
  45. package/schema/client/fragment.d.ts +5 -5
  46. package/schema/client/fragment.js +10 -10
  47. package/schema/client/operation.d.ts +3 -3
  48. package/schema/client/root.d.ts +6 -6
  49. package/schema/client/root.js +1 -1
  50. package/schema/server.d.ts +36 -36
  51. package/schema/server.js +13 -13
  52. package/schema/shared.d.ts +6 -6
  53. package/schema/shared.js +7 -7
  54. package/schema/test-client.json +52031 -1
  55. package/schema/test-server.json +38289 -1
  56. package/schema/utils.js +78 -67
  57. package/utils.js +1 -2
@@ -10,7 +10,7 @@ export declare const clientSchema: z.ZodObject<{
10
10
  _type: z.ZodLiteral<"UnionFragmentSpec">;
11
11
  name: z.ZodString;
12
12
  selections: z.ZodArray<import("./fragment.js").UnionSelectionZodType>;
13
- }, z.core.$strip>]>;
13
+ }, z.core.$strip>], "_type">;
14
14
  }, z.core.$strip>>;
15
15
  operations: z.ZodRecord<z.ZodString, z.ZodObject<{
16
16
  name: z.ZodString;
@@ -34,14 +34,14 @@ export declare const clientSchema: z.ZodObject<{
34
34
  _type: z.ZodLiteral<"Enum">;
35
35
  name: z.ZodString;
36
36
  $ref: z.ZodString;
37
- }, z.core.$strip>]>;
37
+ }, z.core.$strip>], "_type">;
38
38
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
39
39
  }, z.core.$strip>, z.ZodObject<{
40
40
  _type: z.ZodLiteral<"array">;
41
41
  nullable: z.ZodBoolean;
42
42
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
43
43
  type: z.ZodDiscriminatedUnion<[typeof import("../shared.js").inputLiteralSpecSchema, typeof import("../shared.js").inputArraySpecSchema]>;
44
- }, z.core.$strip>]>;
44
+ }, z.core.$strip>], "_type">;
45
45
  }, z.core.$strip>>;
46
46
  fragmentSpec: z.ZodDiscriminatedUnion<[z.ZodObject<{
47
47
  _type: z.ZodLiteral<"ObjectFragmentSpec">;
@@ -51,7 +51,7 @@ export declare const clientSchema: z.ZodObject<{
51
51
  _type: z.ZodLiteral<"UnionFragmentSpec">;
52
52
  name: z.ZodString;
53
53
  selections: z.ZodArray<import("./fragment.js").UnionSelectionZodType>;
54
- }, z.core.$strip>]>;
54
+ }, z.core.$strip>], "_type">;
55
55
  sourceText: z.ZodString;
56
56
  }, z.core.$strip>>;
57
57
  directives: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -71,14 +71,14 @@ export declare const clientSchema: z.ZodObject<{
71
71
  _type: z.ZodLiteral<"Enum">;
72
72
  name: z.ZodString;
73
73
  $ref: z.ZodString;
74
- }, z.core.$strip>]>;
74
+ }, z.core.$strip>], "_type">;
75
75
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
76
76
  }, z.core.$strip>, z.ZodObject<{
77
77
  _type: z.ZodLiteral<"array">;
78
78
  nullable: z.ZodBoolean;
79
79
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
80
80
  type: z.ZodDiscriminatedUnion<[typeof import("../shared.js").inputLiteralSpecSchema, typeof import("../shared.js").inputArraySpecSchema]>;
81
- }, z.core.$strip>]>;
81
+ }, z.core.$strip>], "_type">;
82
82
  }, z.core.$strip>>;
83
83
  locations: z.ZodArray<z.ZodEnum<{
84
84
  MUTATION: "MUTATION";
@@ -5,5 +5,5 @@ import { directiveSchema } from './directive.js';
5
5
  export const clientSchema = z.object({
6
6
  fragments: z.record(z.string(), fragmentSchema),
7
7
  operations: z.record(z.string(), operationSchema),
8
- directives: z.record(z.string(), directiveSchema)
8
+ directives: z.record(z.string(), directiveSchema),
9
9
  });
@@ -18,7 +18,7 @@ export declare const objectTypeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
18
  _type: z.ZodLiteral<"Enum">;
19
19
  name: z.ZodString;
20
20
  $ref: z.ZodString;
21
- }, z.core.$strip>]>;
21
+ }, z.core.$strip>], "_type">;
22
22
  export declare const objectLiteralSpecSchema: z.ZodObject<{
23
23
  _type: z.ZodLiteral<"literal">;
24
24
  type: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -40,7 +40,7 @@ export declare const objectLiteralSpecSchema: z.ZodObject<{
40
40
  _type: z.ZodLiteral<"Enum">;
41
41
  name: z.ZodString;
42
42
  $ref: z.ZodString;
43
- }, z.core.$strip>]>;
43
+ }, z.core.$strip>], "_type">;
44
44
  }, z.core.$strip>;
45
45
  export declare const objectArraySpecSchema: z.ZodObject<{
46
46
  _type: z.ZodLiteral<"array">;
@@ -68,12 +68,12 @@ export declare const objectNonCallableFieldSpecSchema: z.ZodDiscriminatedUnion<[
68
68
  _type: z.ZodLiteral<"Enum">;
69
69
  name: z.ZodString;
70
70
  $ref: z.ZodString;
71
- }, z.core.$strip>]>;
71
+ }, z.core.$strip>], "_type">;
72
72
  }, z.core.$strip>, z.ZodObject<{
73
73
  _type: z.ZodLiteral<"array">;
74
74
  nullable: z.ZodBoolean;
75
75
  type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
76
- }, z.core.$strip>]>;
76
+ }, z.core.$strip>], "_type">;
77
77
  export declare const callableSpecSchema: z.ZodObject<{
78
78
  _type: z.ZodLiteral<"callable">;
79
79
  returnType: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -97,12 +97,12 @@ export declare const callableSpecSchema: z.ZodObject<{
97
97
  _type: z.ZodLiteral<"Enum">;
98
98
  name: z.ZodString;
99
99
  $ref: z.ZodString;
100
- }, z.core.$strip>]>;
100
+ }, z.core.$strip>], "_type">;
101
101
  }, z.core.$strip>, z.ZodObject<{
102
102
  _type: z.ZodLiteral<"array">;
103
103
  nullable: z.ZodBoolean;
104
104
  type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
105
- }, z.core.$strip>]>;
105
+ }, z.core.$strip>], "_type">;
106
106
  arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
107
107
  nullable: z.ZodBoolean;
108
108
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -118,14 +118,14 @@ export declare const callableSpecSchema: z.ZodObject<{
118
118
  _type: z.ZodLiteral<"Enum">;
119
119
  name: z.ZodString;
120
120
  $ref: z.ZodString;
121
- }, z.core.$strip>]>;
121
+ }, z.core.$strip>], "_type">;
122
122
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
123
123
  }, z.core.$strip>, z.ZodObject<{
124
124
  _type: z.ZodLiteral<"array">;
125
125
  nullable: z.ZodBoolean;
126
126
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
127
127
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
128
- }, z.core.$strip>]>;
128
+ }, z.core.$strip>], "_type">;
129
129
  }, z.core.$strip>>;
130
130
  }, z.core.$strip>;
131
131
  export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -149,7 +149,7 @@ export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject
149
149
  _type: z.ZodLiteral<"Enum">;
150
150
  name: z.ZodString;
151
151
  $ref: z.ZodString;
152
- }, z.core.$strip>]>;
152
+ }, z.core.$strip>], "_type">;
153
153
  }, z.core.$strip>, z.ZodObject<{
154
154
  _type: z.ZodLiteral<"array">;
155
155
  nullable: z.ZodBoolean;
@@ -177,12 +177,12 @@ export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject
177
177
  _type: z.ZodLiteral<"Enum">;
178
178
  name: z.ZodString;
179
179
  $ref: z.ZodString;
180
- }, z.core.$strip>]>;
180
+ }, z.core.$strip>], "_type">;
181
181
  }, z.core.$strip>, z.ZodObject<{
182
182
  _type: z.ZodLiteral<"array">;
183
183
  nullable: z.ZodBoolean;
184
184
  type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
185
- }, z.core.$strip>]>;
185
+ }, z.core.$strip>], "_type">;
186
186
  arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
187
187
  nullable: z.ZodBoolean;
188
188
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -198,16 +198,16 @@ export declare const objectFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject
198
198
  _type: z.ZodLiteral<"Enum">;
199
199
  name: z.ZodString;
200
200
  $ref: z.ZodString;
201
- }, z.core.$strip>]>;
201
+ }, z.core.$strip>], "_type">;
202
202
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
203
203
  }, z.core.$strip>, z.ZodObject<{
204
204
  _type: z.ZodLiteral<"array">;
205
205
  nullable: z.ZodBoolean;
206
206
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
207
207
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
208
- }, z.core.$strip>]>;
208
+ }, z.core.$strip>], "_type">;
209
209
  }, z.core.$strip>>;
210
- }, z.core.$strip>]>;
210
+ }, z.core.$strip>], "_type">;
211
211
  export declare const objectFieldSchema: z.ZodObject<{
212
212
  nullable: z.ZodBoolean;
213
213
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -231,7 +231,7 @@ export declare const objectFieldSchema: z.ZodObject<{
231
231
  _type: z.ZodLiteral<"Enum">;
232
232
  name: z.ZodString;
233
233
  $ref: z.ZodString;
234
- }, z.core.$strip>]>;
234
+ }, z.core.$strip>], "_type">;
235
235
  }, z.core.$strip>, z.ZodObject<{
236
236
  _type: z.ZodLiteral<"array">;
237
237
  nullable: z.ZodBoolean;
@@ -259,12 +259,12 @@ export declare const objectFieldSchema: z.ZodObject<{
259
259
  _type: z.ZodLiteral<"Enum">;
260
260
  name: z.ZodString;
261
261
  $ref: z.ZodString;
262
- }, z.core.$strip>]>;
262
+ }, z.core.$strip>], "_type">;
263
263
  }, z.core.$strip>, z.ZodObject<{
264
264
  _type: z.ZodLiteral<"array">;
265
265
  nullable: z.ZodBoolean;
266
266
  type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
267
- }, z.core.$strip>]>;
267
+ }, z.core.$strip>], "_type">;
268
268
  arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
269
269
  nullable: z.ZodBoolean;
270
270
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -280,16 +280,16 @@ export declare const objectFieldSchema: z.ZodObject<{
280
280
  _type: z.ZodLiteral<"Enum">;
281
281
  name: z.ZodString;
282
282
  $ref: z.ZodString;
283
- }, z.core.$strip>]>;
283
+ }, z.core.$strip>], "_type">;
284
284
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
285
285
  }, z.core.$strip>, z.ZodObject<{
286
286
  _type: z.ZodLiteral<"array">;
287
287
  nullable: z.ZodBoolean;
288
288
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
289
289
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
290
- }, z.core.$strip>]>;
290
+ }, z.core.$strip>], "_type">;
291
291
  }, z.core.$strip>>;
292
- }, z.core.$strip>]>;
292
+ }, z.core.$strip>], "_type">;
293
293
  }, z.core.$strip>;
294
294
  export declare const objectSchema: z.ZodObject<{
295
295
  name: z.ZodString;
@@ -317,7 +317,7 @@ export declare const objectSchema: z.ZodObject<{
317
317
  _type: z.ZodLiteral<"Enum">;
318
318
  name: z.ZodString;
319
319
  $ref: z.ZodString;
320
- }, z.core.$strip>]>;
320
+ }, z.core.$strip>], "_type">;
321
321
  }, z.core.$strip>, z.ZodObject<{
322
322
  _type: z.ZodLiteral<"array">;
323
323
  nullable: z.ZodBoolean;
@@ -345,12 +345,12 @@ export declare const objectSchema: z.ZodObject<{
345
345
  _type: z.ZodLiteral<"Enum">;
346
346
  name: z.ZodString;
347
347
  $ref: z.ZodString;
348
- }, z.core.$strip>]>;
348
+ }, z.core.$strip>], "_type">;
349
349
  }, z.core.$strip>, z.ZodObject<{
350
350
  _type: z.ZodLiteral<"array">;
351
351
  nullable: z.ZodBoolean;
352
352
  type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
353
- }, z.core.$strip>]>;
353
+ }, z.core.$strip>], "_type">;
354
354
  arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
355
355
  nullable: z.ZodBoolean;
356
356
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -366,16 +366,16 @@ export declare const objectSchema: z.ZodObject<{
366
366
  _type: z.ZodLiteral<"Enum">;
367
367
  name: z.ZodString;
368
368
  $ref: z.ZodString;
369
- }, z.core.$strip>]>;
369
+ }, z.core.$strip>], "_type">;
370
370
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
371
371
  }, z.core.$strip>, z.ZodObject<{
372
372
  _type: z.ZodLiteral<"array">;
373
373
  nullable: z.ZodBoolean;
374
374
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
375
375
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
376
- }, z.core.$strip>]>;
376
+ }, z.core.$strip>], "_type">;
377
377
  }, z.core.$strip>>;
378
- }, z.core.$strip>]>;
378
+ }, z.core.$strip>], "_type">;
379
379
  }, z.core.$strip>>;
380
380
  }, z.core.$strip>;
381
381
  export declare const inputSchema: z.ZodObject<{
@@ -395,14 +395,14 @@ export declare const inputSchema: z.ZodObject<{
395
395
  _type: z.ZodLiteral<"Enum">;
396
396
  name: z.ZodString;
397
397
  $ref: z.ZodString;
398
- }, z.core.$strip>]>;
398
+ }, z.core.$strip>], "_type">;
399
399
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
400
400
  }, z.core.$strip>, z.ZodObject<{
401
401
  _type: z.ZodLiteral<"array">;
402
402
  nullable: z.ZodBoolean;
403
403
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
404
404
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
405
- }, z.core.$strip>]>;
405
+ }, z.core.$strip>], "_type">;
406
406
  }, z.core.$strip>>;
407
407
  }, z.core.$strip>;
408
408
  export declare const directiveLocationEnum: z.ZodEnum<{
@@ -469,7 +469,7 @@ export declare const serverSchema: z.ZodObject<{
469
469
  _type: z.ZodLiteral<"Enum">;
470
470
  name: z.ZodString;
471
471
  $ref: z.ZodString;
472
- }, z.core.$strip>]>;
472
+ }, z.core.$strip>], "_type">;
473
473
  }, z.core.$strip>, z.ZodObject<{
474
474
  _type: z.ZodLiteral<"array">;
475
475
  nullable: z.ZodBoolean;
@@ -497,12 +497,12 @@ export declare const serverSchema: z.ZodObject<{
497
497
  _type: z.ZodLiteral<"Enum">;
498
498
  name: z.ZodString;
499
499
  $ref: z.ZodString;
500
- }, z.core.$strip>]>;
500
+ }, z.core.$strip>], "_type">;
501
501
  }, z.core.$strip>, z.ZodObject<{
502
502
  _type: z.ZodLiteral<"array">;
503
503
  nullable: z.ZodBoolean;
504
504
  type: z.ZodDiscriminatedUnion<[typeof objectLiteralSpecSchema, typeof objectArraySpecSchema]>;
505
- }, z.core.$strip>]>;
505
+ }, z.core.$strip>], "_type">;
506
506
  arguments: z.ZodRecord<z.ZodString, z.ZodObject<{
507
507
  nullable: z.ZodBoolean;
508
508
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -518,16 +518,16 @@ export declare const serverSchema: z.ZodObject<{
518
518
  _type: z.ZodLiteral<"Enum">;
519
519
  name: z.ZodString;
520
520
  $ref: z.ZodString;
521
- }, z.core.$strip>]>;
521
+ }, z.core.$strip>], "_type">;
522
522
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
523
523
  }, z.core.$strip>, z.ZodObject<{
524
524
  _type: z.ZodLiteral<"array">;
525
525
  nullable: z.ZodBoolean;
526
526
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
527
527
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
528
- }, z.core.$strip>]>;
528
+ }, z.core.$strip>], "_type">;
529
529
  }, z.core.$strip>>;
530
- }, z.core.$strip>]>;
530
+ }, z.core.$strip>], "_type">;
531
531
  }, z.core.$strip>>;
532
532
  }, z.core.$strip>>;
533
533
  directives: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -572,14 +572,14 @@ export declare const serverSchema: z.ZodObject<{
572
572
  _type: z.ZodLiteral<"Enum">;
573
573
  name: z.ZodString;
574
574
  $ref: z.ZodString;
575
- }, z.core.$strip>]>;
575
+ }, z.core.$strip>], "_type">;
576
576
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
577
577
  }, z.core.$strip>, z.ZodObject<{
578
578
  _type: z.ZodLiteral<"array">;
579
579
  nullable: z.ZodBoolean;
580
580
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
581
581
  type: z.ZodDiscriminatedUnion<[typeof import("./shared.js").inputLiteralSpecSchema, typeof import("./shared.js").inputArraySpecSchema]>;
582
- }, z.core.$strip>]>;
582
+ }, z.core.$strip>], "_type">;
583
583
  }, z.core.$strip>>;
584
584
  }, z.core.$strip>>;
585
585
  }, z.core.$strip>;
package/schema/server.js CHANGED
@@ -5,31 +5,31 @@ export const objectTypeSchema = z.discriminatedUnion('_type', [
5
5
  z.object({
6
6
  _type: z.literal('ObjectType'),
7
7
  name: z.string(),
8
- $ref: z.string()
8
+ $ref: z.string(),
9
9
  }),
10
10
  z.object({
11
11
  _type: z.literal('InterfaceType'),
12
12
  name: z.string(),
13
- $ref: z.string()
13
+ $ref: z.string(),
14
14
  }),
15
15
  z.object({
16
16
  _type: z.literal('Scalar'),
17
- name: z.string()
17
+ name: z.string(),
18
18
  }),
19
19
  z.object({
20
20
  _type: z.literal('Union'),
21
21
  name: z.string(),
22
- $ref: z.string()
22
+ $ref: z.string(),
23
23
  }),
24
24
  z.object({
25
25
  _type: z.literal('Enum'),
26
26
  name: z.string(),
27
- $ref: z.string()
27
+ $ref: z.string(),
28
28
  }),
29
29
  ]);
30
30
  export const objectLiteralSpecSchema = z.object({
31
31
  _type: z.literal('literal'),
32
- type: objectTypeSchema
32
+ type: objectTypeSchema,
33
33
  });
34
34
  export const objectArraySpecSchema = z.object({
35
35
  _type: z.literal('array'),
@@ -37,7 +37,7 @@ export const objectArraySpecSchema = z.object({
37
37
  get type() {
38
38
  // eslint-disable-next-line no-use-before-define
39
39
  return objectNonCallableFieldSpecSchema;
40
- }
40
+ },
41
41
  });
42
42
  export const objectNonCallableFieldSpecSchema = z.discriminatedUnion('_type', [
43
43
  objectLiteralSpecSchema,
@@ -46,16 +46,16 @@ export const objectNonCallableFieldSpecSchema = z.discriminatedUnion('_type', [
46
46
  export const callableSpecSchema = z.object({
47
47
  _type: z.literal('callable'),
48
48
  returnType: objectNonCallableFieldSpecSchema,
49
- arguments: z.record(z.string(), inputFieldSchema)
49
+ arguments: z.record(z.string(), inputFieldSchema),
50
50
  });
51
51
  export const objectFieldSpecSchema = z.discriminatedUnion('_type', [
52
52
  objectLiteralSpecSchema,
53
53
  objectArraySpecSchema,
54
- callableSpecSchema
54
+ callableSpecSchema,
55
55
  ]);
56
56
  export const objectFieldSchema = z.object({
57
57
  nullable: z.boolean(),
58
- spec: objectFieldSpecSchema
58
+ spec: objectFieldSpecSchema,
59
59
  });
60
60
  export const objectSchema = z.object({
61
61
  name: z.string(),
@@ -81,7 +81,7 @@ export const directiveLocationEnum = z.enum([
81
81
  ]);
82
82
  export const directiveSchema = z.object({
83
83
  name: z.string(),
84
- locations: z.array(directiveLocationEnum)
84
+ locations: z.array(directiveLocationEnum),
85
85
  });
86
86
  export const unionSchema = z.object({
87
87
  name: z.string(),
@@ -89,7 +89,7 @@ export const unionSchema = z.object({
89
89
  });
90
90
  export const enumSchema = z.object({
91
91
  name: z.string(),
92
- values: z.array(z.string())
92
+ values: z.array(z.string()),
93
93
  });
94
94
  export const serverSchema = z.object({
95
95
  objects: z.record(z.string(), objectSchema),
@@ -97,5 +97,5 @@ export const serverSchema = z.object({
97
97
  unions: z.record(z.string(), unionSchema),
98
98
  enums: z.record(z.string(), enumSchema),
99
99
  scalars: z.array(z.string()),
100
- inputs: z.record(z.string(), inputSchema)
100
+ inputs: z.record(z.string(), inputSchema),
101
101
  });
@@ -10,7 +10,7 @@ export declare const inputTypeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
10
10
  _type: z.ZodLiteral<"Enum">;
11
11
  name: z.ZodString;
12
12
  $ref: z.ZodString;
13
- }, z.core.$strip>]>;
13
+ }, z.core.$strip>], "_type">;
14
14
  export declare const literalSchema: z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>;
15
15
  export declare const arrayLiteralSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>;
16
16
  export declare const inputLiteralSpecSchema: z.ZodObject<{
@@ -26,7 +26,7 @@ export declare const inputLiteralSpecSchema: z.ZodObject<{
26
26
  _type: z.ZodLiteral<"Enum">;
27
27
  name: z.ZodString;
28
28
  $ref: z.ZodString;
29
- }, z.core.$strip>]>;
29
+ }, z.core.$strip>], "_type">;
30
30
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
31
31
  }, z.core.$strip>;
32
32
  export declare const inputArraySpecSchema: z.ZodObject<{
@@ -48,14 +48,14 @@ export declare const inputFieldSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
48
48
  _type: z.ZodLiteral<"Enum">;
49
49
  name: z.ZodString;
50
50
  $ref: z.ZodString;
51
- }, z.core.$strip>]>;
51
+ }, z.core.$strip>], "_type">;
52
52
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
53
53
  }, z.core.$strip>, z.ZodObject<{
54
54
  _type: z.ZodLiteral<"array">;
55
55
  nullable: z.ZodBoolean;
56
56
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
57
57
  type: z.ZodDiscriminatedUnion<[typeof inputLiteralSpecSchema, typeof inputArraySpecSchema]>;
58
- }, z.core.$strip>]>;
58
+ }, z.core.$strip>], "_type">;
59
59
  export declare const inputFieldSchema: z.ZodObject<{
60
60
  nullable: z.ZodBoolean;
61
61
  spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -71,12 +71,12 @@ export declare const inputFieldSchema: z.ZodObject<{
71
71
  _type: z.ZodLiteral<"Enum">;
72
72
  name: z.ZodString;
73
73
  $ref: z.ZodString;
74
- }, z.core.$strip>]>;
74
+ }, z.core.$strip>], "_type">;
75
75
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodInt, z.ZodFloat32, z.ZodBoolean]>>>;
76
76
  }, z.core.$strip>, z.ZodObject<{
77
77
  _type: z.ZodLiteral<"array">;
78
78
  nullable: z.ZodBoolean;
79
79
  defaultValue: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodInt>, z.ZodArray<z.ZodFloat32>, z.ZodArray<z.ZodBoolean>]>>>;
80
80
  type: z.ZodDiscriminatedUnion<[typeof inputLiteralSpecSchema, typeof inputArraySpecSchema]>;
81
- }, z.core.$strip>]>;
81
+ }, z.core.$strip>], "_type">;
82
82
  }, z.core.$strip>;
package/schema/shared.js CHANGED
@@ -3,34 +3,34 @@ export const inputTypeSchema = z.discriminatedUnion('_type', [
3
3
  z.object({
4
4
  _type: z.literal('InputType'),
5
5
  name: z.string(),
6
- $ref: z.string()
6
+ $ref: z.string(),
7
7
  }),
8
8
  z.object({
9
9
  _type: z.literal('Scalar'),
10
- name: z.string()
10
+ name: z.string(),
11
11
  }),
12
12
  z.object({
13
13
  _type: z.literal('Enum'),
14
14
  name: z.string(),
15
- $ref: z.string()
15
+ $ref: z.string(),
16
16
  }),
17
17
  ]);
18
18
  export const literalSchema = z.union([
19
19
  z.string(),
20
20
  z.int(),
21
21
  z.float32(),
22
- z.boolean()
22
+ z.boolean(),
23
23
  ]);
24
24
  export const arrayLiteralSchema = z.union([
25
25
  z.array(z.string()),
26
26
  z.array(z.int()),
27
27
  z.array(z.float32()),
28
- z.array(z.boolean())
28
+ z.array(z.boolean()),
29
29
  ]);
30
30
  export const inputLiteralSpecSchema = z.object({
31
31
  _type: z.literal('literal'),
32
32
  type: inputTypeSchema,
33
- defaultValue: literalSchema.optional().nullable()
33
+ defaultValue: literalSchema.optional().nullable(),
34
34
  });
35
35
  export const inputArraySpecSchema = z.object({
36
36
  _type: z.literal('array'),
@@ -47,5 +47,5 @@ export const inputFieldSpecSchema = z.discriminatedUnion('_type', [
47
47
  ]);
48
48
  export const inputFieldSchema = z.object({
49
49
  nullable: z.boolean(),
50
- spec: inputFieldSpecSchema
50
+ spec: inputFieldSpecSchema,
51
51
  });