polen 0.11.0-next.22 → 0.11.0-next.24

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 (93) hide show
  1. package/build/api/config/normalized.d.ts +200 -200
  2. package/build/api/examples/schemas/catalog.d.ts +4 -4
  3. package/build/api/examples/schemas/type-usage-index.d.ts +5 -5
  4. package/build/api/examples/schemas/type-usage-index.js +2 -2
  5. package/build/api/examples/schemas/type-usage-index.js.map +1 -1
  6. package/build/api/examples/type-usage-indexer.d.ts.map +1 -1
  7. package/build/api/examples/type-usage-indexer.js +41 -35
  8. package/build/api/examples/type-usage-indexer.js.map +1 -1
  9. package/build/api/schema/input-sources/directory.d.ts +1 -1
  10. package/build/api/schema/input-sources/directory.js +3 -3
  11. package/build/api/schema/input-sources/directory.js.map +1 -1
  12. package/build/api/schema/input-sources/file.d.ts +1 -1
  13. package/build/api/schema/input-sources/file.js +3 -3
  14. package/build/api/schema/input-sources/file.js.map +1 -1
  15. package/build/api/schema/input-sources/introspection-file.d.ts +1 -1
  16. package/build/api/schema/input-sources/introspection.d.ts +1 -1
  17. package/build/api/schema/input-sources/memory.d.ts +1 -1
  18. package/build/api/schema/input-sources/memory.js +3 -3
  19. package/build/api/schema/input-sources/memory.js.map +1 -1
  20. package/build/api/schema/input-sources/versioned-directory.d.ts +2 -2
  21. package/build/api/schema/input-sources/versioned-directory.js +3 -3
  22. package/build/api/schema/input-sources/versioned-directory.js.map +1 -1
  23. package/build/cli/commands/open.js +1 -1
  24. package/build/cli/commands/open.js.map +1 -1
  25. package/build/lib/catalog/catalog.d.ts +30 -30
  26. package/build/lib/catalog/unversioned.d.ts +8 -8
  27. package/build/lib/catalog/versioned.d.ts +16 -16
  28. package/build/lib/change/change.d.ts +6 -6
  29. package/build/lib/grafaid/$$.d.ts +2 -0
  30. package/build/lib/grafaid/$$.d.ts.map +1 -1
  31. package/build/lib/grafaid/$$.js +2 -0
  32. package/build/lib/grafaid/$$.js.map +1 -1
  33. package/build/lib/grafaid/parse-error.d.ts +46 -0
  34. package/build/lib/grafaid/parse-error.d.ts.map +1 -0
  35. package/build/lib/grafaid/parse-error.js +29 -0
  36. package/build/lib/grafaid/parse-error.js.map +1 -0
  37. package/build/lib/grafaid/parse.d.ts +70 -0
  38. package/build/lib/grafaid/parse.d.ts.map +1 -0
  39. package/build/lib/grafaid/parse.js +119 -0
  40. package/build/lib/grafaid/parse.js.map +1 -0
  41. package/build/lib/grafaid/schema/ast.d.ts +0 -2
  42. package/build/lib/grafaid/schema/ast.d.ts.map +1 -1
  43. package/build/lib/grafaid/schema/ast.js +1 -7
  44. package/build/lib/grafaid/schema/ast.js.map +1 -1
  45. package/build/lib/grafaid/schema/read.js +2 -2
  46. package/build/lib/grafaid/schema/read.js.map +1 -1
  47. package/build/lib/grafaid/schema/schema.d.ts +2 -1
  48. package/build/lib/grafaid/schema/schema.d.ts.map +1 -1
  49. package/build/lib/grafaid/schema/schema.js +5 -1
  50. package/build/lib/grafaid/schema/schema.js.map +1 -1
  51. package/build/lib/graphql-schema-loader/graphql-schema-loader.d.ts.map +1 -1
  52. package/build/lib/graphql-schema-loader/graphql-schema-loader.js +4 -4
  53. package/build/lib/graphql-schema-loader/graphql-schema-loader.js.map +1 -1
  54. package/build/lib/revision/revision.d.ts +30 -30
  55. package/build/lib/schema/schema.d.ts +18 -18
  56. package/build/lib/schema/unversioned.d.ts +28 -28
  57. package/build/lib/schema/versioned.d.ts +16 -16
  58. package/build/template/components/ExampleLink.d.ts.map +1 -1
  59. package/build/template/components/ExampleLink.js +4 -2
  60. package/build/template/components/ExampleLink.js.map +1 -1
  61. package/build/template/components/NamedType.d.ts.map +1 -1
  62. package/build/template/components/NamedType.js +1 -1
  63. package/build/template/components/NamedType.js.map +1 -1
  64. package/build/template/components/VersionCoveragePicker.d.ts.map +1 -1
  65. package/build/template/components/VersionCoveragePicker.js +6 -1
  66. package/build/template/components/VersionCoveragePicker.js.map +1 -1
  67. package/build/template/routes/pages.d.ts.map +1 -1
  68. package/build/template/routes/pages.js +5 -1
  69. package/build/template/routes/pages.js.map +1 -1
  70. package/build/template/stores/changelog.d.ts +1 -1
  71. package/package.json +1 -1
  72. package/src/api/examples/schemas/type-usage-index.ts +2 -2
  73. package/src/api/examples/type-usage-indexer.test.ts +152 -234
  74. package/src/api/examples/type-usage-indexer.ts +64 -52
  75. package/src/api/schema/$.test.ts +1 -1
  76. package/src/api/schema/input-sources/directory.ts +3 -3
  77. package/src/api/schema/input-sources/file.ts +3 -3
  78. package/src/api/schema/input-sources/memory.ts +3 -3
  79. package/src/api/schema/input-sources/versioned-directory.ts +3 -3
  80. package/src/cli/commands/open.ts +1 -1
  81. package/src/lib/grafaid/$$.ts +2 -0
  82. package/src/lib/grafaid/parse-error.ts +69 -0
  83. package/src/lib/grafaid/parse.test.ts +175 -0
  84. package/src/lib/grafaid/parse.ts +165 -0
  85. package/src/lib/grafaid/schema/ast.ts +1 -9
  86. package/src/lib/grafaid/schema/read.ts +2 -2
  87. package/src/lib/grafaid/schema/schema.ts +10 -2
  88. package/src/lib/graphql-schema-loader/graphql-schema-loader.ts +4 -12
  89. package/src/lib/path-map/$.test.ts +28 -13
  90. package/src/template/components/ExampleLink.tsx +4 -2
  91. package/src/template/components/NamedType.tsx +3 -1
  92. package/src/template/components/VersionCoveragePicker.tsx +8 -2
  93. package/src/template/routes/pages.tsx +6 -1
@@ -1551,11 +1551,11 @@ export declare const make: (props: {
1551
1551
  readonly path?: string | undefined;
1552
1552
  readonly message: string;
1553
1553
  readonly name: string;
1554
+ readonly locations: readonly string[];
1554
1555
  readonly criticality: {
1555
1556
  readonly reason?: string | undefined;
1556
1557
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
1557
1558
  };
1558
- readonly locations: readonly string[];
1559
1559
  } | {
1560
1560
  readonly _tag: "DIRECTIVE_REMOVED";
1561
1561
  readonly path?: string | undefined;
@@ -2146,11 +2146,11 @@ export declare const make: (props: {
2146
2146
  readonly path?: string | undefined;
2147
2147
  readonly message: string;
2148
2148
  readonly name: string;
2149
+ readonly locations: readonly string[];
2149
2150
  readonly criticality: {
2150
2151
  readonly reason?: string | undefined;
2151
2152
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
2152
2153
  };
2153
- readonly locations: readonly string[];
2154
2154
  } | {
2155
2155
  readonly _tag: "DIRECTIVE_REMOVED";
2156
2156
  readonly path?: string | undefined;
@@ -2743,11 +2743,11 @@ export declare const make: (props: {
2743
2743
  readonly path?: string | undefined;
2744
2744
  readonly message: string;
2745
2745
  readonly name: string;
2746
+ readonly locations: readonly string[];
2746
2747
  readonly criticality: {
2747
2748
  readonly reason?: string | undefined;
2748
2749
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
2749
2750
  };
2750
- readonly locations: readonly string[];
2751
2751
  } | {
2752
2752
  readonly _tag: "DIRECTIVE_REMOVED";
2753
2753
  readonly path?: string | undefined;
@@ -3338,11 +3338,11 @@ export declare const make: (props: {
3338
3338
  readonly path?: string | undefined;
3339
3339
  readonly message: string;
3340
3340
  readonly name: string;
3341
+ readonly locations: readonly string[];
3341
3342
  readonly criticality: {
3342
3343
  readonly reason?: string | undefined;
3343
3344
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
3344
3345
  };
3345
- readonly locations: readonly string[];
3346
3346
  } | {
3347
3347
  readonly _tag: "DIRECTIVE_REMOVED";
3348
3348
  readonly path?: string | undefined;
@@ -3936,11 +3936,11 @@ export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST
3936
3936
  readonly path?: string | undefined;
3937
3937
  readonly message: string;
3938
3938
  readonly name: string;
3939
+ readonly locations: readonly string[];
3939
3940
  readonly criticality: {
3940
3941
  readonly reason?: string | undefined;
3941
3942
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
3942
3943
  };
3943
- readonly locations: readonly string[];
3944
3944
  } | {
3945
3945
  readonly _tag: "DIRECTIVE_REMOVED";
3946
3946
  readonly path?: string | undefined;
@@ -4531,11 +4531,11 @@ export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST
4531
4531
  readonly path?: string | undefined;
4532
4532
  readonly message: string;
4533
4533
  readonly name: string;
4534
+ readonly locations: readonly string[];
4534
4535
  readonly criticality: {
4535
4536
  readonly reason?: string | undefined;
4536
4537
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
4537
4538
  };
4538
- readonly locations: readonly string[];
4539
4539
  } | {
4540
4540
  readonly _tag: "DIRECTIVE_REMOVED";
4541
4541
  readonly path?: string | undefined;
@@ -5128,11 +5128,11 @@ export declare const decode: (i: {
5128
5128
  readonly _tag: "DIRECTIVE_ADDED";
5129
5129
  readonly message: string;
5130
5130
  readonly name: string;
5131
+ readonly locations: readonly string[];
5131
5132
  readonly criticality: {
5132
5133
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
5133
5134
  readonly reason?: string | undefined;
5134
5135
  };
5135
- readonly locations: readonly string[];
5136
5136
  readonly path?: string | undefined;
5137
5137
  } | {
5138
5138
  readonly _tag: "DIRECTIVE_REMOVED";
@@ -5723,11 +5723,11 @@ export declare const decode: (i: {
5723
5723
  readonly _tag: "DIRECTIVE_ADDED";
5724
5724
  readonly message: string;
5725
5725
  readonly name: string;
5726
+ readonly locations: readonly string[];
5726
5727
  readonly criticality: {
5727
5728
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
5728
5729
  readonly reason?: string | undefined;
5729
5730
  };
5730
- readonly locations: readonly string[];
5731
5731
  readonly path?: string | undefined;
5732
5732
  } | {
5733
5733
  readonly _tag: "DIRECTIVE_REMOVED";
@@ -6321,11 +6321,11 @@ export declare const decode: (i: {
6321
6321
  readonly path?: string | undefined;
6322
6322
  readonly message: string;
6323
6323
  readonly name: string;
6324
+ readonly locations: readonly string[];
6324
6325
  readonly criticality: {
6325
6326
  readonly reason?: string | undefined;
6326
6327
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
6327
6328
  };
6328
- readonly locations: readonly string[];
6329
6329
  } | {
6330
6330
  readonly _tag: "DIRECTIVE_REMOVED";
6331
6331
  readonly path?: string | undefined;
@@ -6916,11 +6916,11 @@ export declare const decode: (i: {
6916
6916
  readonly path?: string | undefined;
6917
6917
  readonly message: string;
6918
6918
  readonly name: string;
6919
+ readonly locations: readonly string[];
6919
6920
  readonly criticality: {
6920
6921
  readonly reason?: string | undefined;
6921
6922
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
6922
6923
  };
6923
- readonly locations: readonly string[];
6924
6924
  } | {
6925
6925
  readonly _tag: "DIRECTIVE_REMOVED";
6926
6926
  readonly path?: string | undefined;
@@ -7514,11 +7514,11 @@ export declare const encode: (a: {
7514
7514
  readonly path?: string | undefined;
7515
7515
  readonly message: string;
7516
7516
  readonly name: string;
7517
+ readonly locations: readonly string[];
7517
7518
  readonly criticality: {
7518
7519
  readonly reason?: string | undefined;
7519
7520
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
7520
7521
  };
7521
- readonly locations: readonly string[];
7522
7522
  } | {
7523
7523
  readonly _tag: "DIRECTIVE_REMOVED";
7524
7524
  readonly path?: string | undefined;
@@ -8109,11 +8109,11 @@ export declare const encode: (a: {
8109
8109
  readonly path?: string | undefined;
8110
8110
  readonly message: string;
8111
8111
  readonly name: string;
8112
+ readonly locations: readonly string[];
8112
8113
  readonly criticality: {
8113
8114
  readonly reason?: string | undefined;
8114
8115
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
8115
8116
  };
8116
- readonly locations: readonly string[];
8117
8117
  } | {
8118
8118
  readonly _tag: "DIRECTIVE_REMOVED";
8119
8119
  readonly path?: string | undefined;
@@ -8705,11 +8705,11 @@ export declare const encode: (a: {
8705
8705
  readonly _tag: "DIRECTIVE_ADDED";
8706
8706
  readonly message: string;
8707
8707
  readonly name: string;
8708
+ readonly locations: readonly string[];
8708
8709
  readonly criticality: {
8709
8710
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
8710
8711
  readonly reason?: string | undefined;
8711
8712
  };
8712
- readonly locations: readonly string[];
8713
8713
  readonly path?: string | undefined;
8714
8714
  } | {
8715
8715
  readonly _tag: "DIRECTIVE_REMOVED";
@@ -9300,11 +9300,11 @@ export declare const encode: (a: {
9300
9300
  readonly _tag: "DIRECTIVE_ADDED";
9301
9301
  readonly message: string;
9302
9302
  readonly name: string;
9303
+ readonly locations: readonly string[];
9303
9304
  readonly criticality: {
9304
9305
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
9305
9306
  readonly reason?: string | undefined;
9306
9307
  };
9307
- readonly locations: readonly string[];
9308
9308
  readonly path?: string | undefined;
9309
9309
  } | {
9310
9310
  readonly _tag: "DIRECTIVE_REMOVED";
@@ -9899,11 +9899,11 @@ export declare const equivalence: import("effect/Equivalence").Equivalence<{
9899
9899
  readonly path?: string | undefined;
9900
9900
  readonly message: string;
9901
9901
  readonly name: string;
9902
+ readonly locations: readonly string[];
9902
9903
  readonly criticality: {
9903
9904
  readonly reason?: string | undefined;
9904
9905
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
9905
9906
  };
9906
- readonly locations: readonly string[];
9907
9907
  } | {
9908
9908
  readonly _tag: "DIRECTIVE_REMOVED";
9909
9909
  readonly path?: string | undefined;
@@ -10494,11 +10494,11 @@ export declare const equivalence: import("effect/Equivalence").Equivalence<{
10494
10494
  readonly path?: string | undefined;
10495
10495
  readonly message: string;
10496
10496
  readonly name: string;
10497
+ readonly locations: readonly string[];
10497
10498
  readonly criticality: {
10498
10499
  readonly reason?: string | undefined;
10499
10500
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
10500
10501
  };
10501
- readonly locations: readonly string[];
10502
10502
  } | {
10503
10503
  readonly _tag: "DIRECTIVE_REMOVED";
10504
10504
  readonly path?: string | undefined;
@@ -1573,11 +1573,11 @@ export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST
1573
1573
  readonly path?: string | undefined;
1574
1574
  readonly message: string;
1575
1575
  readonly name: string;
1576
+ readonly locations: readonly string[];
1576
1577
  readonly criticality: {
1577
1578
  readonly reason?: string | undefined;
1578
1579
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
1579
1580
  };
1580
- readonly locations: readonly string[];
1581
1581
  } | {
1582
1582
  readonly _tag: "DIRECTIVE_REMOVED";
1583
1583
  readonly path?: string | undefined;
@@ -2206,11 +2206,11 @@ export declare const decode: (i: {
2206
2206
  readonly _tag: "DIRECTIVE_ADDED";
2207
2207
  readonly message: string;
2208
2208
  readonly name: string;
2209
+ readonly locations: readonly string[];
2209
2210
  readonly criticality: {
2210
2211
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
2211
2212
  readonly reason?: string | undefined;
2212
2213
  };
2213
- readonly locations: readonly string[];
2214
2214
  readonly path?: string | undefined;
2215
2215
  } | {
2216
2216
  readonly _tag: "DIRECTIVE_REMOVED";
@@ -2793,11 +2793,11 @@ export declare const decode: (i: {
2793
2793
  readonly path?: string | undefined;
2794
2794
  readonly message: string;
2795
2795
  readonly name: string;
2796
+ readonly locations: readonly string[];
2796
2797
  readonly criticality: {
2797
2798
  readonly reason?: string | undefined;
2798
2799
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
2799
2800
  };
2800
- readonly locations: readonly string[];
2801
2801
  } | {
2802
2802
  readonly _tag: "DIRECTIVE_REMOVED";
2803
2803
  readonly path?: string | undefined;
@@ -3380,11 +3380,11 @@ export declare const encode: (a: {
3380
3380
  readonly path?: string | undefined;
3381
3381
  readonly message: string;
3382
3382
  readonly name: string;
3383
+ readonly locations: readonly string[];
3383
3384
  readonly criticality: {
3384
3385
  readonly reason?: string | undefined;
3385
3386
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
3386
3387
  };
3387
- readonly locations: readonly string[];
3388
3388
  } | {
3389
3389
  readonly _tag: "DIRECTIVE_REMOVED";
3390
3390
  readonly path?: string | undefined;
@@ -3965,11 +3965,11 @@ export declare const encode: (a: {
3965
3965
  readonly _tag: "DIRECTIVE_ADDED";
3966
3966
  readonly message: string;
3967
3967
  readonly name: string;
3968
+ readonly locations: readonly string[];
3968
3969
  readonly criticality: {
3969
3970
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
3970
3971
  readonly reason?: string | undefined;
3971
3972
  };
3972
- readonly locations: readonly string[];
3973
3973
  readonly path?: string | undefined;
3974
3974
  } | {
3975
3975
  readonly _tag: "DIRECTIVE_REMOVED";
@@ -4569,11 +4569,11 @@ export declare const equivalence: import("effect/Equivalence").Equivalence<{
4569
4569
  readonly path?: string | undefined;
4570
4570
  readonly message: string;
4571
4571
  readonly name: string;
4572
+ readonly locations: readonly string[];
4572
4573
  readonly criticality: {
4573
4574
  readonly reason?: string | undefined;
4574
4575
  readonly level: "BREAKING" | "DANGEROUS" | "NON_BREAKING";
4575
4576
  };
4576
- readonly locations: readonly string[];
4577
4577
  } | {
4578
4578
  readonly _tag: "DIRECTIVE_REMOVED";
4579
4579
  readonly path?: string | undefined;
@@ -1,5 +1,7 @@
1
1
  export * as Document from './document.js';
2
2
  export * from './graphql.js';
3
3
  export * as HTTP from './http/http.js';
4
+ export { ParseError } from './parse-error.js';
5
+ export * as Parse from './parse.js';
4
6
  export * as Schema from './schema/schema.js';
5
7
  //# sourceMappingURL=$$.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/lib/grafaid/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/lib/grafaid/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA"}
@@ -1,5 +1,7 @@
1
1
  export * as Document from './document.js';
2
2
  export * from './graphql.js';
3
3
  export * as HTTP from './http/http.js';
4
+ export { ParseError } from './parse-error.js';
5
+ export * as Parse from './parse.js';
4
6
  export * as Schema from './schema/schema.js';
5
7
  //# sourceMappingURL=$$.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/lib/grafaid/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/lib/grafaid/$$.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,46 @@
1
+ declare const ParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
2
+ readonly _tag: "ParseError";
3
+ } & Readonly<A>;
4
+ /**
5
+ * Error that occurs when parsing GraphQL source text fails.
6
+ *
7
+ * This error provides structured information about parse failures,
8
+ * including the source context and the underlying parse error details.
9
+ */
10
+ export declare class ParseError extends ParseError_base<{
11
+ /**
12
+ * The type of GraphQL content being parsed.
13
+ * Helps identify whether the error occurred while parsing a schema or a document.
14
+ */
15
+ readonly parseType: 'schema' | 'document' | 'unknown';
16
+ /**
17
+ * Optional source identifier for debugging.
18
+ * Could be a file path, URL, or other identifier.
19
+ */
20
+ readonly source?: string;
21
+ /**
22
+ * The error message describing what went wrong.
23
+ */
24
+ readonly message: string;
25
+ /**
26
+ * The original error that caused the parse failure.
27
+ */
28
+ readonly cause?: unknown;
29
+ /**
30
+ * Optional excerpt of the source text where the error occurred.
31
+ * Useful for showing context in error messages.
32
+ */
33
+ readonly excerpt?: string;
34
+ }> {
35
+ }
36
+ /**
37
+ * Helper to create a ParseError with common defaults.
38
+ */
39
+ export declare const makeParseError: (message: string, options?: {
40
+ parseType?: "schema" | "document" | "unknown";
41
+ source?: string;
42
+ cause?: unknown;
43
+ excerpt?: string;
44
+ }) => ParseError;
45
+ export {};
46
+ //# sourceMappingURL=parse-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-error.d.ts","sourceRoot":"","sources":["../../../src/lib/grafaid/parse-error.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,gBAA+B;IAC7D;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IAErD;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAExB;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAC;CAAG;AAEL;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,MAAM,EACf,UAAU;IACR,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,KACA,UAmBF,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { Data } from 'effect';
2
+ /**
3
+ * Error that occurs when parsing GraphQL source text fails.
4
+ *
5
+ * This error provides structured information about parse failures,
6
+ * including the source context and the underlying parse error details.
7
+ */
8
+ export class ParseError extends Data.TaggedError('ParseError') {
9
+ }
10
+ /**
11
+ * Helper to create a ParseError with common defaults.
12
+ */
13
+ export const makeParseError = (message, options) => {
14
+ const props = {
15
+ parseType: options?.parseType ?? 'unknown',
16
+ message,
17
+ };
18
+ if (options?.source !== undefined) {
19
+ props.source = options.source;
20
+ }
21
+ if (options?.cause !== undefined) {
22
+ props.cause = options.cause;
23
+ }
24
+ if (options?.excerpt !== undefined) {
25
+ props.excerpt = options.excerpt;
26
+ }
27
+ return new ParseError(props);
28
+ };
29
+ //# sourceMappingURL=parse-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-error.js","sourceRoot":"","sources":["../../../src/lib/grafaid/parse-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B;;;;;GAKG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAI,CAAC,WAAW,CAAC,YAAY,CA4B3D;CAAG;AAEL;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAe,EACf,OAKC,EACW,EAAE;IACd,MAAM,KAAK,GAAQ;QACjB,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,SAAS;QAC1C,OAAO;KACR,CAAA;IAED,IAAI,OAAO,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;QAClC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC/B,CAAC;IAED,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;QACjC,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;IAC7B,CAAC;IAED,IAAI,OAAO,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;QACnC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IACjC,CAAC;IAED,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC,CAAA"}
@@ -0,0 +1,70 @@
1
+ import { Effect } from 'effect';
2
+ import { type DocumentNode } from 'graphql';
3
+ import { ParseError } from './parse-error.js';
4
+ /**
5
+ * Parse GraphQL source text into an AST.
6
+ *
7
+ * This is the centralized parsing function that should be used throughout
8
+ * the codebase for parsing any GraphQL content (schemas or documents).
9
+ *
10
+ * @param source - The GraphQL source text to parse
11
+ * @param options - Optional parsing configuration
12
+ * @returns An Effect that yields a DocumentNode AST or fails with ParseError
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * // Parse a schema
17
+ * const schemaAst = yield* parse(schemaSDL, {
18
+ * parseType: 'schema',
19
+ * source: 'schema.graphql'
20
+ * })
21
+ *
22
+ * // Parse a query document
23
+ * const queryAst = yield* parse(queryString, {
24
+ * parseType: 'document',
25
+ * source: 'getUserQuery'
26
+ * })
27
+ * ```
28
+ */
29
+ export declare const parse: (source: string, options?: {
30
+ /**
31
+ * The type of content being parsed.
32
+ * Helps provide better error messages.
33
+ */
34
+ parseType?: "schema" | "document" | "unknown";
35
+ /**
36
+ * Optional source identifier for debugging.
37
+ * Could be a file path, URL, or descriptive name.
38
+ */
39
+ source?: string;
40
+ }) => Effect.Effect<DocumentNode, ParseError>;
41
+ /**
42
+ * Parse GraphQL schema SDL with typed errors.
43
+ *
44
+ * This is a specialized version of parse() that's explicitly for schemas.
45
+ *
46
+ * @param source - The GraphQL schema SDL to parse
47
+ * @param options - Optional parsing configuration
48
+ * @returns An Effect that yields a DocumentNode AST or fails with ParseError
49
+ */
50
+ export declare const parseSchema: (source: string, options?: {
51
+ source?: string;
52
+ }) => Effect.Effect<DocumentNode, ParseError>;
53
+ /**
54
+ * Parse GraphQL document (query/mutation/subscription) with typed errors.
55
+ *
56
+ * This is a specialized version of parse() that's explicitly for executable documents.
57
+ *
58
+ * @param source - The GraphQL document to parse
59
+ * @param options - Optional parsing configuration
60
+ * @returns An Effect that yields a DocumentNode AST or fails with ParseError
61
+ */
62
+ export declare const parseDocument: (source: string, options?: {
63
+ source?: string;
64
+ }) => Effect.Effect<DocumentNode, ParseError>;
65
+ /**
66
+ * Create an empty DocumentNode.
67
+ * Useful for representing an absence of GraphQL content.
68
+ */
69
+ export declare const empty: DocumentNode;
70
+ //# sourceMappingURL=parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/lib/grafaid/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,SAAS,CAAA;AACxE,OAAO,EAAkB,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,KAAK,GAChB,QAAQ,MAAM,EACd,UAAU;IACR;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IAE7C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KACA,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CA6CrC,CAAA;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,UAAU;IACR,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KACA,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAIrC,CAAA;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,MAAM,EACd,UAAU;IACR,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KACA,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAIrC,CAAA;AA4BJ;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,YAGnB,CAAA"}
@@ -0,0 +1,119 @@
1
+ import { Effect } from 'effect';
2
+ import { Kind, parse as graphqlParse } from 'graphql';
3
+ import { makeParseError, ParseError } from './parse-error.js';
4
+ /**
5
+ * Parse GraphQL source text into an AST.
6
+ *
7
+ * This is the centralized parsing function that should be used throughout
8
+ * the codebase for parsing any GraphQL content (schemas or documents).
9
+ *
10
+ * @param source - The GraphQL source text to parse
11
+ * @param options - Optional parsing configuration
12
+ * @returns An Effect that yields a DocumentNode AST or fails with ParseError
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * // Parse a schema
17
+ * const schemaAst = yield* parse(schemaSDL, {
18
+ * parseType: 'schema',
19
+ * source: 'schema.graphql'
20
+ * })
21
+ *
22
+ * // Parse a query document
23
+ * const queryAst = yield* parse(queryString, {
24
+ * parseType: 'document',
25
+ * source: 'getUserQuery'
26
+ * })
27
+ * ```
28
+ */
29
+ export const parse = (source, options) => Effect.try({
30
+ try: () => graphqlParse(source),
31
+ catch: (error) => {
32
+ // Extract useful error information
33
+ let message = 'Failed to parse GraphQL';
34
+ let excerpt;
35
+ if (error instanceof Error) {
36
+ message = error.message;
37
+ // GraphQL parse errors often include location info
38
+ // Try to extract a meaningful excerpt if possible
39
+ if ('locations' in error && Array.isArray(error.locations) && error.locations.length > 0) {
40
+ const location = error.locations[0];
41
+ if (location && typeof location.line === 'number') {
42
+ const lines = source.split('\n');
43
+ const errorLine = lines[location.line - 1];
44
+ if (errorLine) {
45
+ excerpt = `Line ${location.line}: ${errorLine.trim()}`;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ const parseType = options?.parseType ?? inferParseType(source);
51
+ const errorOptions = {
52
+ parseType,
53
+ cause: error,
54
+ };
55
+ if (options?.source) {
56
+ errorOptions.source = options.source;
57
+ }
58
+ if (excerpt) {
59
+ errorOptions.excerpt = excerpt;
60
+ }
61
+ return makeParseError(`Failed to parse GraphQL ${parseType}${options?.source ? ` from ${options.source}` : ''}: ${message}`, errorOptions);
62
+ },
63
+ });
64
+ /**
65
+ * Parse GraphQL schema SDL with typed errors.
66
+ *
67
+ * This is a specialized version of parse() that's explicitly for schemas.
68
+ *
69
+ * @param source - The GraphQL schema SDL to parse
70
+ * @param options - Optional parsing configuration
71
+ * @returns An Effect that yields a DocumentNode AST or fails with ParseError
72
+ */
73
+ export const parseSchema = (source, options) => parse(source, {
74
+ parseType: 'schema',
75
+ ...options,
76
+ });
77
+ /**
78
+ * Parse GraphQL document (query/mutation/subscription) with typed errors.
79
+ *
80
+ * This is a specialized version of parse() that's explicitly for executable documents.
81
+ *
82
+ * @param source - The GraphQL document to parse
83
+ * @param options - Optional parsing configuration
84
+ * @returns An Effect that yields a DocumentNode AST or fails with ParseError
85
+ */
86
+ export const parseDocument = (source, options) => parse(source, {
87
+ parseType: 'document',
88
+ ...options,
89
+ });
90
+ /**
91
+ * Try to infer whether the source is a schema or document.
92
+ * This is a best-effort heuristic and may not always be accurate.
93
+ */
94
+ const inferParseType = (source) => {
95
+ // Common schema definition keywords
96
+ const schemaKeywords = /^\s*(type|interface|enum|scalar|union|input|schema|extend|directive)\s+/m;
97
+ // Common document keywords
98
+ const documentKeywords = /^\s*(query|mutation|subscription|fragment)\s+/m;
99
+ if (schemaKeywords.test(source)) {
100
+ return 'schema';
101
+ }
102
+ if (documentKeywords.test(source)) {
103
+ return 'document';
104
+ }
105
+ // Check for anonymous query syntax { ... }
106
+ if (/^\s*\{/.test(source)) {
107
+ return 'document';
108
+ }
109
+ return 'unknown';
110
+ };
111
+ /**
112
+ * Create an empty DocumentNode.
113
+ * Useful for representing an absence of GraphQL content.
114
+ */
115
+ export const empty = {
116
+ definitions: [],
117
+ kind: Kind.DOCUMENT,
118
+ };
119
+ //# sourceMappingURL=parse.js.map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C;QAChC,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,2CAA2C;IAC3C,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAiB;IACjC,WAAW,EAAE,EAAE;IACf,IAAI,EAAE,IAAI,CAAC,QAAQ;CACpB,CAAA"}
@@ -1,6 +1,4 @@
1
- import { Effect } from 'effect';
2
1
  import { type DocumentNode } from 'graphql';
3
- export declare const parse: (source: string) => Effect.Effect<DocumentNode, Error>;
4
2
  export { type DocumentNode as Document } from 'graphql';
5
3
  export declare const empty: DocumentNode;
6
4
  //# sourceMappingURL=ast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../../../src/lib/grafaid/schema/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,SAAS,CAAA;AAGxE,eAAO,MAAM,KAAK,GAAI,QAAQ,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAIpE,CAAA;AAEJ,OAAO,EAAE,KAAK,YAAY,IAAI,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvD,eAAO,MAAM,KAAK,EAAE,YAAuD,CAAA"}
1
+ {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../../../src/lib/grafaid/schema/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAQ,MAAM,SAAS,CAAA;AAEjD,OAAO,EAAE,KAAK,YAAY,IAAI,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvD,eAAO,MAAM,KAAK,EAAE,YAAuD,CAAA"}
@@ -1,10 +1,4 @@
1
- import { Effect } from 'effect';
2
- import { Kind, parse as graphqlParse } from 'graphql';
3
- // Effect-based version of parse
4
- export const parse = (source) => Effect.try({
5
- try: () => graphqlParse(source),
6
- catch: (error) => new Error(`Failed to parse GraphQL: ${error}`),
7
- });
1
+ import { Kind } from 'graphql';
8
2
  export {} from 'graphql';
9
3
  export const empty = { definitions: [], kind: Kind.DOCUMENT };
10
4
  //# sourceMappingURL=ast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast.js","sourceRoot":"","sources":["../../../../src/lib/grafaid/schema/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAqB,IAAI,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,SAAS,CAAA;AAExE,gCAAgC;AAChC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,MAAc,EAAsC,EAAE,CAC1E,MAAM,CAAC,GAAG,CAAC;IACT,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,4BAA4B,KAAK,EAAE,CAAC;CACjE,CAAC,CAAA;AAEJ,OAAO,EAAiC,MAAM,SAAS,CAAA;AAEvD,MAAM,CAAC,MAAM,KAAK,GAAiB,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"ast.js","sourceRoot":"","sources":["../../../../src/lib/grafaid/schema/ast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAE,MAAM,SAAS,CAAA;AAEjD,OAAO,EAAiC,MAAM,SAAS,CAAA;AAEvD,MAAM,CAAC,MAAM,KAAK,GAAiB,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA"}
@@ -2,7 +2,7 @@ import { FileSystem } from '@effect/platform/FileSystem';
2
2
  import { Fs } from '@wollybeard/kit';
3
3
  import { Effect } from 'effect';
4
4
  import {} from 'graphql';
5
- import * as AST from './ast.js';
5
+ import * as Parse from '../parse.js';
6
6
  import { fromAST } from './schema.js';
7
7
  export const read = (sdlFilePath) => Effect.gen(function* () {
8
8
  const fs = yield* FileSystem;
@@ -14,7 +14,7 @@ export const read = (sdlFilePath) => Effect.gen(function* () {
14
14
  // Read file content
15
15
  const content = yield* fs.readFileString(sdlFilePath);
16
16
  // Parse and build schema
17
- const node = yield* AST.parse(content);
17
+ const node = yield* Parse.parseSchema(content, { source: sdlFilePath });
18
18
  const schema = yield* fromAST(node);
19
19
  return {
20
20
  path: sdlFilePath,
@@ -1 +1 @@
1
- {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../src/lib/grafaid/schema/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAsB,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,WAAmB,EAAmE,EAAE,CAC3G,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAA;IAE5B,uBAAuB;IACvB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAA;IAC3D,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,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