polen 0.11.0-next.24 → 0.11.0-next.26

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 (375) hide show
  1. package/build/api/config/input.d.ts +259 -77
  2. package/build/api/config/input.d.ts.map +1 -1
  3. package/build/api/config/input.js +2 -0
  4. package/build/api/config/input.js.map +1 -1
  5. package/build/api/config/normalized.d.ts +433 -143
  6. package/build/api/config/normalized.d.ts.map +1 -1
  7. package/build/api/config/normalized.js +47 -0
  8. package/build/api/config/normalized.js.map +1 -1
  9. package/build/api/config-template/template.d.ts +191 -121
  10. package/build/api/config-template/template.d.ts.map +1 -1
  11. package/build/api/config-template/template.js +18 -1
  12. package/build/api/config-template/template.js.map +1 -1
  13. package/build/api/examples/diagnostic/diagnostic.d.ts +0 -23
  14. package/build/api/examples/diagnostic/diagnostic.d.ts.map +1 -1
  15. package/build/api/examples/diagnostic/diagnostic.js +1 -3
  16. package/build/api/examples/diagnostic/diagnostic.js.map +1 -1
  17. package/build/api/examples/scanner.d.ts +27 -1
  18. package/build/api/examples/scanner.d.ts.map +1 -1
  19. package/build/api/examples/scanner.js +30 -17
  20. package/build/api/examples/scanner.js.map +1 -1
  21. package/build/api/examples/schemas/catalog.d.ts +56 -12
  22. package/build/api/examples/schemas/catalog.d.ts.map +1 -1
  23. package/build/api/examples/schemas/example/example.d.ts +54 -11
  24. package/build/api/examples/schemas/example/example.d.ts.map +1 -1
  25. package/build/api/examples/schemas/example/example.js +5 -0
  26. package/build/api/examples/schemas/example/example.js.map +1 -1
  27. package/build/api/reference/$.d.ts +4 -0
  28. package/build/api/reference/$.d.ts.map +1 -0
  29. package/build/api/reference/$.js +4 -0
  30. package/build/api/reference/$.js.map +1 -0
  31. package/build/api/reference/catalog.d.ts +69 -0
  32. package/build/api/reference/catalog.d.ts.map +1 -0
  33. package/build/api/reference/catalog.js +44 -0
  34. package/build/api/reference/catalog.js.map +1 -0
  35. package/build/api/reference/config.d.ts +616 -0
  36. package/build/api/reference/config.d.ts.map +1 -0
  37. package/build/api/reference/config.js +162 -0
  38. package/build/api/reference/config.js.map +1 -0
  39. package/build/api/reference/scanner.d.ts +26 -0
  40. package/build/api/reference/scanner.d.ts.map +1 -0
  41. package/build/api/reference/scanner.js +27 -0
  42. package/build/api/reference/scanner.js.map +1 -0
  43. package/build/api/schema/augmentations/$$.d.ts +7 -0
  44. package/build/api/schema/augmentations/$$.d.ts.map +1 -0
  45. package/build/api/schema/augmentations/$$.js +7 -0
  46. package/build/api/schema/augmentations/$$.js.map +1 -0
  47. package/build/api/schema/augmentations/$.d.ts +1 -1
  48. package/build/api/schema/augmentations/$.d.ts.map +1 -1
  49. package/build/api/schema/augmentations/$.js +1 -1
  50. package/build/api/schema/augmentations/$.js.map +1 -1
  51. package/build/api/schema/augmentations/apply.d.ts +29 -0
  52. package/build/api/schema/augmentations/apply.d.ts.map +1 -0
  53. package/build/api/schema/augmentations/apply.js +181 -0
  54. package/build/api/schema/augmentations/apply.js.map +1 -0
  55. package/build/api/schema/augmentations/augmentation.d.ts +31 -0
  56. package/build/api/schema/augmentations/augmentation.d.ts.map +1 -0
  57. package/build/api/schema/augmentations/augmentation.js +22 -0
  58. package/build/api/schema/augmentations/augmentation.js.map +1 -0
  59. package/build/api/schema/augmentations/config.d.ts +24 -0
  60. package/build/api/schema/augmentations/config.d.ts.map +1 -0
  61. package/build/api/schema/augmentations/config.js +9 -0
  62. package/build/api/schema/augmentations/config.js.map +1 -0
  63. package/build/api/schema/augmentations/diagnostics/diagnostic.d.ts +67 -0
  64. package/build/api/schema/augmentations/diagnostics/diagnostic.d.ts.map +1 -0
  65. package/build/api/schema/augmentations/diagnostics/diagnostic.js +13 -0
  66. package/build/api/schema/augmentations/diagnostics/diagnostic.js.map +1 -0
  67. package/build/api/schema/augmentations/diagnostics/duplicate-version.d.ts +45 -0
  68. package/build/api/schema/augmentations/diagnostics/duplicate-version.d.ts.map +1 -0
  69. package/build/api/schema/augmentations/diagnostics/duplicate-version.js +17 -0
  70. package/build/api/schema/augmentations/diagnostics/duplicate-version.js.map +1 -0
  71. package/build/api/schema/augmentations/diagnostics/invalid-path.d.ts +46 -0
  72. package/build/api/schema/augmentations/diagnostics/invalid-path.d.ts.map +1 -0
  73. package/build/api/schema/augmentations/diagnostics/invalid-path.js +18 -0
  74. package/build/api/schema/augmentations/diagnostics/invalid-path.js.map +1 -0
  75. package/build/api/schema/augmentations/diagnostics/version-mismatch.d.ts +46 -0
  76. package/build/api/schema/augmentations/diagnostics/version-mismatch.d.ts.map +1 -0
  77. package/build/api/schema/augmentations/diagnostics/version-mismatch.js +18 -0
  78. package/build/api/schema/augmentations/diagnostics/version-mismatch.js.map +1 -0
  79. package/build/api/schema/augmentations/input.d.ts +145 -0
  80. package/build/api/schema/augmentations/input.d.ts.map +1 -0
  81. package/build/api/schema/augmentations/input.js +191 -0
  82. package/build/api/schema/augmentations/input.js.map +1 -0
  83. package/build/api/schema/augmentations/placement.d.ts +8 -0
  84. package/build/api/schema/augmentations/placement.d.ts.map +1 -0
  85. package/build/api/schema/augmentations/placement.js +7 -0
  86. package/build/api/schema/augmentations/placement.js.map +1 -0
  87. package/build/api/schema/config-schema.d.ts +66 -66
  88. package/build/api/schema/config-schema.d.ts.map +1 -1
  89. package/build/api/schema/config-schema.js +2 -2
  90. package/build/api/schema/config-schema.js.map +1 -1
  91. package/build/api/schema/input-source/load.d.ts +2 -0
  92. package/build/api/schema/input-source/load.d.ts.map +1 -1
  93. package/build/api/schema/input-source/load.js.map +1 -1
  94. package/build/api/schema/input-sources/directory.d.ts +39 -39
  95. package/build/api/schema/input-sources/file.d.ts +39 -39
  96. package/build/api/schema/input-sources/introspection-file.d.ts +39 -39
  97. package/build/api/schema/input-sources/introspection.d.ts +39 -39
  98. package/build/api/schema/input-sources/memory.d.ts +39 -39
  99. package/build/api/schema/input-sources/versioned-directory.d.ts +79 -79
  100. package/build/api/schema/load.d.ts.map +1 -1
  101. package/build/api/schema/load.js +9 -2
  102. package/build/api/schema/load.js.map +1 -1
  103. package/build/lib/catalog/catalog.d.ts +1181 -1181
  104. package/build/lib/catalog/unversioned.d.ts +312 -312
  105. package/build/lib/catalog/versioned.d.ts +634 -634
  106. package/build/lib/change/change.d.ts +238 -238
  107. package/build/lib/document/document.d.ts +14 -8
  108. package/build/lib/document/document.d.ts.map +1 -1
  109. package/build/lib/document/versioned.d.ts +17 -10
  110. package/build/lib/document/versioned.d.ts.map +1 -1
  111. package/build/lib/grafaid/schema/KindMap/_.d.ts +1 -1
  112. package/build/lib/grafaid/schema/format-default-value.d.ts +11 -0
  113. package/build/lib/grafaid/schema/format-default-value.d.ts.map +1 -0
  114. package/build/lib/grafaid/schema/format-default-value.js +20 -0
  115. package/build/lib/grafaid/schema/format-default-value.js.map +1 -0
  116. package/build/lib/grafaid/schema/schema.d.ts +1 -0
  117. package/build/lib/grafaid/schema/schema.d.ts.map +1 -1
  118. package/build/lib/grafaid/schema/schema.js +1 -0
  119. package/build/lib/grafaid/schema/schema.js.map +1 -1
  120. package/build/lib/graphql-path/$$.d.ts +7 -13
  121. package/build/lib/graphql-path/$$.d.ts.map +1 -1
  122. package/build/lib/graphql-path/$$.js +7 -13
  123. package/build/lib/graphql-path/$$.js.map +1 -1
  124. package/build/lib/graphql-path/definition.d.ts +104 -94
  125. package/build/lib/graphql-path/definition.d.ts.map +1 -1
  126. package/build/lib/graphql-path/definition.js +126 -125
  127. package/build/lib/graphql-path/definition.js.map +1 -1
  128. package/build/lib/graphql-path/query.d.ts +25 -57
  129. package/build/lib/graphql-path/query.d.ts.map +1 -1
  130. package/build/lib/graphql-path/query.js +15 -93
  131. package/build/lib/graphql-path/query.js.map +1 -1
  132. package/build/lib/graphql-path/schema.d.ts +49 -0
  133. package/build/lib/graphql-path/schema.d.ts.map +1 -0
  134. package/build/lib/graphql-path/schema.js +89 -0
  135. package/build/lib/graphql-path/schema.js.map +1 -0
  136. package/build/lib/graphql-path/types.d.ts +76 -28
  137. package/build/lib/graphql-path/types.d.ts.map +1 -1
  138. package/build/lib/graphql-path/types.js +101 -2
  139. package/build/lib/graphql-path/types.js.map +1 -1
  140. package/build/lib/revision/revision.d.ts +1170 -1170
  141. package/build/lib/schema/schema.d.ts +708 -708
  142. package/build/lib/schema/unversioned.d.ts +1092 -1092
  143. package/build/lib/schema/versioned.d.ts +634 -634
  144. package/build/lib/semver/official-release.d.ts +10 -10
  145. package/build/lib/semver/pre-release.d.ts +10 -10
  146. package/build/lib/semver/semver.d.ts +50 -50
  147. package/build/lib/version-coverage/version-coverage.d.ts +43 -11
  148. package/build/lib/version-coverage/version-coverage.d.ts.map +1 -1
  149. package/build/lib/version-coverage/version-coverage.js +40 -6
  150. package/build/lib/version-coverage/version-coverage.js.map +1 -1
  151. package/build/template/components/ArgumentAnnotation.d.ts +2 -1
  152. package/build/template/components/ArgumentAnnotation.d.ts.map +1 -1
  153. package/build/template/components/ArgumentAnnotation.js +14 -4
  154. package/build/template/components/ArgumentAnnotation.js.map +1 -1
  155. package/build/template/components/ArgumentListAnnotation.d.ts +1 -0
  156. package/build/template/components/ArgumentListAnnotation.d.ts.map +1 -1
  157. package/build/template/components/ArgumentListAnnotation.js +21 -8
  158. package/build/template/components/ArgumentListAnnotation.js.map +1 -1
  159. package/build/template/components/Changelog/groups/FieldArgument.d.ts.map +1 -1
  160. package/build/template/components/Changelog/groups/FieldArgument.js +0 -1
  161. package/build/template/components/Changelog/groups/FieldArgument.js.map +1 -1
  162. package/build/template/components/CodeBlock.d.ts.map +1 -1
  163. package/build/template/components/CodeBlock.js +1 -1
  164. package/build/template/components/CodeBlock.js.map +1 -1
  165. package/build/template/components/Description.js +1 -1
  166. package/build/template/components/Description.js.map +1 -1
  167. package/build/template/components/ExampleLink.d.ts.map +1 -1
  168. package/build/template/components/ExampleLink.js +2 -1
  169. package/build/template/components/ExampleLink.js.map +1 -1
  170. package/build/template/components/Field.d.ts +2 -0
  171. package/build/template/components/Field.d.ts.map +1 -1
  172. package/build/template/components/Field.js +42 -4
  173. package/build/template/components/Field.js.map +1 -1
  174. package/build/template/components/FieldList.d.ts +2 -1
  175. package/build/template/components/FieldList.d.ts.map +1 -1
  176. package/build/template/components/FieldList.js +14 -3
  177. package/build/template/components/FieldList.js.map +1 -1
  178. package/build/template/components/FieldListSection.d.ts.map +1 -1
  179. package/build/template/components/FieldListSection.js +6 -1
  180. package/build/template/components/FieldListSection.js.map +1 -1
  181. package/build/template/components/GraphQLDocument.d.ts.map +1 -1
  182. package/build/template/components/GraphQLDocument.js +2 -1
  183. package/build/template/components/GraphQLDocument.js.map +1 -1
  184. package/build/template/components/GraphQLInteractive/GraphQLInteractive.d.ts +2 -0
  185. package/build/template/components/GraphQLInteractive/GraphQLInteractive.d.ts.map +1 -1
  186. package/build/template/components/GraphQLInteractive/GraphQLInteractive.js +4 -3
  187. package/build/template/components/GraphQLInteractive/GraphQLInteractive.js.map +1 -1
  188. package/build/template/components/GraphQLInteractive/lib/parser.d.ts +2 -2
  189. package/build/template/components/GraphQLInteractive/lib/parser.d.ts.map +1 -1
  190. package/build/template/components/GraphQLInteractive/lib/parser.js +17 -12
  191. package/build/template/components/GraphQLInteractive/lib/parser.js.map +1 -1
  192. package/build/template/components/IAPIndicator.d.ts +12 -0
  193. package/build/template/components/IAPIndicator.d.ts.map +1 -0
  194. package/build/template/components/IAPIndicator.js +21 -0
  195. package/build/template/components/IAPIndicator.js.map +1 -0
  196. package/build/template/components/Link.d.ts +1 -2
  197. package/build/template/components/Link.d.ts.map +1 -1
  198. package/build/template/components/Link.js +5 -2
  199. package/build/template/components/Link.js.map +1 -1
  200. package/build/template/components/NamedType.d.ts.map +1 -1
  201. package/build/template/components/NamedType.js +9 -5
  202. package/build/template/components/NamedType.js.map +1 -1
  203. package/build/template/components/ReferenceLink.d.ts +2 -2
  204. package/build/template/components/ReferenceLink.d.ts.map +1 -1
  205. package/build/template/components/ReferenceLink.js +5 -3
  206. package/build/template/components/ReferenceLink.js.map +1 -1
  207. package/build/template/components/TypeAnnotation.d.ts +2 -0
  208. package/build/template/components/TypeAnnotation.d.ts.map +1 -1
  209. package/build/template/components/TypeAnnotation.js +4 -4
  210. package/build/template/components/TypeAnnotation.js.map +1 -1
  211. package/build/template/components/ViewModeToggle.d.ts +3 -0
  212. package/build/template/components/ViewModeToggle.d.ts.map +1 -0
  213. package/build/template/components/ViewModeToggle.js +9 -0
  214. package/build/template/components/ViewModeToggle.js.map +1 -0
  215. package/build/template/components/graphql/type-link.d.ts +2 -0
  216. package/build/template/components/graphql/type-link.d.ts.map +1 -1
  217. package/build/template/components/graphql/type-link.js +15 -3
  218. package/build/template/components/graphql/type-link.js.map +1 -1
  219. package/build/template/components/home/PlaygroundPreview.d.ts.map +1 -1
  220. package/build/template/components/home/PlaygroundPreview.js +3 -2
  221. package/build/template/components/home/PlaygroundPreview.js.map +1 -1
  222. package/build/template/components/sidebar/SidebarItem.d.ts.map +1 -1
  223. package/build/template/components/sidebar/SidebarItem.js +18 -5
  224. package/build/template/components/sidebar/SidebarItem.js.map +1 -1
  225. package/build/template/contexts/ReferenceConfigContext.d.ts +16 -0
  226. package/build/template/contexts/ReferenceConfigContext.d.ts.map +1 -0
  227. package/build/template/contexts/ReferenceConfigContext.js +14 -0
  228. package/build/template/contexts/ReferenceConfigContext.js.map +1 -0
  229. package/build/template/contexts/ViewModeContext.d.ts +14 -0
  230. package/build/template/contexts/ViewModeContext.d.ts.map +1 -0
  231. package/build/template/contexts/ViewModeContext.js +40 -0
  232. package/build/template/contexts/ViewModeContext.js.map +1 -0
  233. package/build/template/hooks/use-examples.d.ts +4 -1
  234. package/build/template/hooks/use-examples.d.ts.map +1 -1
  235. package/build/template/hooks/useAlignedColumns.d.ts +10 -0
  236. package/build/template/hooks/useAlignedColumns.d.ts.map +1 -0
  237. package/build/template/hooks/useAlignedColumns.js +17 -0
  238. package/build/template/hooks/useAlignedColumns.js.map +1 -0
  239. package/build/template/routes/changelog/ChangelogSidebar.d.ts +2 -2
  240. package/build/template/routes/changelog/ChangelogSidebar.d.ts.map +1 -1
  241. package/build/template/routes/changelog/ChangelogSidebar.js +4 -4
  242. package/build/template/routes/changelog/ChangelogSidebar.js.map +1 -1
  243. package/build/template/routes/examples/_.d.ts +12 -3
  244. package/build/template/routes/examples/_.d.ts.map +1 -1
  245. package/build/template/routes/examples/_index.d.ts +8 -2
  246. package/build/template/routes/examples/_index.d.ts.map +1 -1
  247. package/build/template/routes/examples/name.d.ts +12 -3
  248. package/build/template/routes/examples/name.d.ts.map +1 -1
  249. package/build/template/routes/examples/name.js +6 -2
  250. package/build/template/routes/examples/name.js.map +1 -1
  251. package/build/template/routes/reference.d.ts.map +1 -1
  252. package/build/template/routes/reference.js +37 -10
  253. package/build/template/routes/reference.js.map +1 -1
  254. package/build/template/stores/changelog.d.ts +39 -39
  255. package/build/vite/plugins/core.d.ts.map +1 -1
  256. package/build/vite/plugins/core.js +6 -0
  257. package/build/vite/plugins/core.js.map +1 -1
  258. package/build/vite/plugins/examples.d.ts.map +1 -1
  259. package/build/vite/plugins/examples.js +10 -3
  260. package/build/vite/plugins/examples.js.map +1 -1
  261. package/build/vite/plugins/index.d.ts +1 -0
  262. package/build/vite/plugins/index.d.ts.map +1 -1
  263. package/build/vite/plugins/index.js +1 -0
  264. package/build/vite/plugins/index.js.map +1 -1
  265. package/build/vite/plugins/navbar.d.ts.map +1 -1
  266. package/build/vite/plugins/navbar.js +3 -1
  267. package/build/vite/plugins/navbar.js.map +1 -1
  268. package/build/vite/plugins/reference.d.ts +19 -0
  269. package/build/vite/plugins/reference.d.ts.map +1 -0
  270. package/build/vite/plugins/reference.js +96 -0
  271. package/build/vite/plugins/reference.js.map +1 -0
  272. package/build/vite/plugins/schemas.d.ts.map +1 -1
  273. package/build/vite/plugins/schemas.js +38 -2
  274. package/build/vite/plugins/schemas.js.map +1 -1
  275. package/package.json +1 -1
  276. package/src/api/config/input.ts +2 -0
  277. package/src/api/config/normalized.ts +54 -0
  278. package/src/api/config-template/template.ts +18 -1
  279. package/src/api/examples/diagnostic/diagnostic.ts +0 -3
  280. package/src/api/examples/scanner.test.ts +83 -0
  281. package/src/api/examples/scanner.ts +31 -21
  282. package/src/api/examples/schemas/example/example.ts +6 -0
  283. package/src/api/reference/$.ts +3 -0
  284. package/src/api/reference/catalog.ts +55 -0
  285. package/src/api/reference/config.ts +193 -0
  286. package/src/api/reference/scanner.ts +53 -0
  287. package/src/api/schema/augmentations/$$.ts +6 -0
  288. package/src/api/schema/augmentations/$.ts +1 -1
  289. package/src/api/schema/augmentations/apply.test.ts +89 -0
  290. package/src/api/schema/augmentations/apply.ts +277 -0
  291. package/src/api/schema/augmentations/augmentation.ts +24 -0
  292. package/src/api/schema/augmentations/config.ts +11 -0
  293. package/src/api/schema/augmentations/diagnostics/diagnostic.ts +20 -0
  294. package/src/api/schema/augmentations/diagnostics/duplicate-version.ts +20 -0
  295. package/src/api/schema/augmentations/diagnostics/invalid-path.ts +21 -0
  296. package/src/api/schema/augmentations/diagnostics/version-mismatch.ts +21 -0
  297. package/src/api/schema/augmentations/input.test.ts +144 -0
  298. package/src/api/schema/augmentations/input.ts +215 -0
  299. package/src/api/schema/augmentations/placement.ts +11 -0
  300. package/src/api/schema/config-schema.ts +2 -2
  301. package/src/api/schema/input-source/load.ts +2 -0
  302. package/src/api/schema/load.ts +19 -2
  303. package/src/lib/grafaid/schema/format-default-value.ts +22 -0
  304. package/src/lib/grafaid/schema/schema.ts +2 -0
  305. package/src/lib/graphql-path/$$.ts +7 -13
  306. package/src/lib/graphql-path/$.test.ts +175 -0
  307. package/src/lib/graphql-path/definition.ts +162 -162
  308. package/src/lib/graphql-path/query.ts +15 -98
  309. package/src/lib/graphql-path/schema.ts +136 -0
  310. package/src/lib/graphql-path/types.ts +108 -28
  311. package/src/lib/version-coverage/version-coverage.ts +48 -6
  312. package/src/template/components/ArgumentAnnotation.tsx +58 -9
  313. package/src/template/components/ArgumentListAnnotation.tsx +50 -17
  314. package/src/template/components/Changelog/groups/FieldArgument.tsx +0 -1
  315. package/src/template/components/CodeBlock.tsx +1 -0
  316. package/src/template/components/Description.tsx +1 -1
  317. package/src/template/components/ExampleLink.tsx +2 -1
  318. package/src/template/components/Field.tsx +148 -20
  319. package/src/template/components/FieldList.tsx +28 -13
  320. package/src/template/components/FieldListSection.tsx +12 -2
  321. package/src/template/components/GraphQLDocument.tsx +2 -0
  322. package/src/template/components/GraphQLInteractive/GraphQLInteractive.tsx +6 -1
  323. package/src/template/components/GraphQLInteractive/lib/parser.ts +16 -3
  324. package/src/template/components/IAPIndicator.tsx +73 -0
  325. package/src/template/components/Link.tsx +9 -3
  326. package/src/template/components/NamedType.tsx +54 -28
  327. package/src/template/components/ReferenceLink.tsx +16 -10
  328. package/src/template/components/TypeAnnotation.tsx +17 -5
  329. package/src/template/components/ViewModeToggle.tsx +27 -0
  330. package/src/template/components/graphql/type-link.tsx +34 -3
  331. package/src/template/components/home/PlaygroundPreview.tsx +3 -0
  332. package/src/template/components/sidebar/SidebarItem.tsx +21 -5
  333. package/src/template/contexts/ReferenceConfigContext.tsx +37 -0
  334. package/src/template/contexts/ViewModeContext.tsx +64 -0
  335. package/src/template/hooks/useAlignedColumns.ts +19 -0
  336. package/src/template/routes/changelog/ChangelogSidebar.tsx +4 -4
  337. package/src/template/routes/examples/name.tsx +13 -1
  338. package/src/template/routes/reference.tsx +67 -23
  339. package/src/types/virtual-modules.d.ts +5 -0
  340. package/src/vite/plugins/core.ts +6 -0
  341. package/src/vite/plugins/examples.ts +12 -2
  342. package/src/vite/plugins/index.ts +1 -0
  343. package/src/vite/plugins/navbar.ts +4 -1
  344. package/src/vite/plugins/reference.ts +130 -0
  345. package/src/vite/plugins/schemas.ts +51 -2
  346. package/build/api/examples/diagnostic/unused-default.d.ts +0 -49
  347. package/build/api/examples/diagnostic/unused-default.d.ts.map +0 -1
  348. package/build/api/examples/diagnostic/unused-default.js +0 -19
  349. package/build/api/examples/diagnostic/unused-default.js.map +0 -1
  350. package/build/api/schema/augmentations/augmentations/description.d.ts +0 -26
  351. package/build/api/schema/augmentations/augmentations/description.d.ts.map +0 -1
  352. package/build/api/schema/augmentations/augmentations/description.js +0 -55
  353. package/build/api/schema/augmentations/augmentations/description.js.map +0 -1
  354. package/build/api/schema/augmentations/schema-augmentation.d.ts +0 -20
  355. package/build/api/schema/augmentations/schema-augmentation.d.ts.map +0 -1
  356. package/build/api/schema/augmentations/schema-augmentation.js +0 -22
  357. package/build/api/schema/augmentations/schema-augmentation.js.map +0 -1
  358. package/build/api/schema/augmentations/target.d.ts +0 -25
  359. package/build/api/schema/augmentations/target.d.ts.map +0 -1
  360. package/build/api/schema/augmentations/target.js +0 -39
  361. package/build/api/schema/augmentations/target.js.map +0 -1
  362. package/build/lib/graphql-path/constructors.d.ts +0 -57
  363. package/build/lib/graphql-path/constructors.d.ts.map +0 -1
  364. package/build/lib/graphql-path/constructors.js +0 -73
  365. package/build/lib/graphql-path/constructors.js.map +0 -1
  366. package/build/template/components/ArgumentList.d.ts +0 -6
  367. package/build/template/components/ArgumentList.d.ts.map +0 -1
  368. package/build/template/components/ArgumentList.js +0 -9
  369. package/build/template/components/ArgumentList.js.map +0 -1
  370. package/src/api/examples/diagnostic/unused-default.ts +0 -22
  371. package/src/api/schema/augmentations/augmentations/description.ts +0 -69
  372. package/src/api/schema/augmentations/schema-augmentation.ts +0 -32
  373. package/src/api/schema/augmentations/target.ts +0 -61
  374. package/src/lib/graphql-path/constructors.ts +0 -81
  375. package/src/template/components/ArgumentList.tsx +0 -22
@@ -1,192 +1,193 @@
1
1
  /**
2
- * Definition path operations
3
- */
4
- import { createArgumentSegment, createFieldSegment, createTypeSegment } from './constructors.js';
5
- /**
6
- * Encode a definition path to a human-readable expression string
7
- *
8
- * @param path - The definition path to encode
9
- * @returns A string expression representation
10
- * @example
11
- * encode(field('User', 'name')) // 'User.name'
12
- * encode(argument('User', 'posts', 'limit')) // 'User.posts(limit)'
13
- */
14
- export const encode = (path) => {
15
- if (isTypeDefinitionPath(path)) {
16
- return path[0].type;
17
- }
18
- else if (isFieldDefinitionPath(path)) {
19
- return `${path[0].type}.${path[1].field}`;
20
- }
21
- else if (isArgumentDefinitionPath(path)) {
22
- return `${path[0].type}.${path[1].field}(${path[2].argument})`;
23
- }
24
- return '';
25
- };
2
+ * Definition path operations using Effect Schema transforms
3
+ */
4
+ import { S } from '#lib/kit-temp/effect';
5
+ import { ParseResult } from 'effect';
6
+ import { ArgumentSegment, FieldSegment, TypeSegment } from './types.js';
7
+ // ============================================================================
8
+ // Internal Path Schemas (Decoded Forms)
9
+ // ============================================================================
10
+ const TypeDefinitionPathDecoded = S.Tuple(TypeSegment);
11
+ const FieldDefinitionPathDecoded = S.Tuple(TypeSegment, FieldSegment);
12
+ const ArgumentDefinitionPathDecoded = S.Tuple(TypeSegment, FieldSegment, ArgumentSegment);
13
+ // ============================================================================
14
+ // Transform Codecs (String <-> Struct)
15
+ // ============================================================================
16
+ /**
17
+ * Type definition path codec
18
+ * Encoded: "User"
19
+ * Decoded: [{ _tag: 'TypeSegment', type: 'User' }]
20
+ */
21
+ export const TypeDefinitionPath = S.transformOrFail(S.String, TypeDefinitionPathDecoded, {
22
+ decode: (str, _options, ast) => {
23
+ if (!str || str.includes('.') || str.includes('(')) {
24
+ return ParseResult.fail(new ParseResult.Type(ast, str));
25
+ }
26
+ return ParseResult.succeed([TypeSegment.make({ type: str })]);
27
+ },
28
+ encode: (path) => ParseResult.succeed(path[0].type),
29
+ }).annotations({
30
+ identifier: 'TypeDefinitionPath',
31
+ description: 'Path to a type definition',
32
+ });
33
+ /**
34
+ * Field definition path codec
35
+ * Encoded: "User.name"
36
+ * Decoded: [{ _tag: 'TypeSegment', type: 'User' }, { _tag: 'FieldSegment', field: 'name' }]
37
+ */
38
+ export const FieldDefinitionPath = S.transformOrFail(S.String, FieldDefinitionPathDecoded, {
39
+ decode: (str, _options, ast) => {
40
+ const parts = str.split('.');
41
+ if (parts.length !== 2 || !parts[0] || !parts[1] || str.includes('(')) {
42
+ return ParseResult.fail(new ParseResult.Type(ast, str));
43
+ }
44
+ return ParseResult.succeed([
45
+ TypeSegment.make({ type: parts[0] }),
46
+ FieldSegment.make({ field: parts[1] }),
47
+ ]);
48
+ },
49
+ encode: (path) => ParseResult.succeed(`${path[0].type}.${path[1].field}`),
50
+ }).annotations({
51
+ identifier: 'FieldDefinitionPath',
52
+ description: 'Path to a field definition',
53
+ });
54
+ /**
55
+ * Argument definition path codec
56
+ * Encoded: "User.posts(limit)"
57
+ * Decoded: [{ _tag: 'TypeSegment', type: 'User' }, { _tag: 'FieldSegment', field: 'posts' }, { _tag: 'ArgumentSegment', argument: 'limit' }]
58
+ */
59
+ export const ArgumentDefinitionPath = S.transformOrFail(S.String, ArgumentDefinitionPathDecoded, {
60
+ decode: (str, _options, ast) => {
61
+ const match = str.match(/^([^.]+)\.([^.(]+)\(([^)]+)\)$/);
62
+ if (!match || !match[1] || !match[2] || !match[3]) {
63
+ return ParseResult.fail(new ParseResult.Type(ast, str));
64
+ }
65
+ return ParseResult.succeed([
66
+ TypeSegment.make({ type: match[1] }),
67
+ FieldSegment.make({ field: match[2] }),
68
+ ArgumentSegment.make({ argument: match[3] }),
69
+ ]);
70
+ },
71
+ encode: (path) => ParseResult.succeed(`${path[0].type}.${path[1].field}(${path[2].argument})`),
72
+ }).annotations({
73
+ identifier: 'ArgumentDefinitionPath',
74
+ description: 'Path to an argument definition',
75
+ });
76
+ /**
77
+ * Union of all definition paths
78
+ * Automatically determines the correct path type from the string format
79
+ */
80
+ export const DefinitionPath = S.Union(ArgumentDefinitionPath, // Check argument first (most specific)
81
+ FieldDefinitionPath, // Then field
82
+ TypeDefinitionPath).annotations({
83
+ identifier: 'DefinitionPath',
84
+ description: 'Union of all definition path types',
85
+ });
86
+ // ============================================================================
87
+ // Codec Functions
88
+ // ============================================================================
26
89
  /**
27
90
  * Decode a string expression into a definition path
28
- *
29
91
  * @param expression - The string expression to decode
30
- * @returns The decoded definition path or null if invalid
92
+ * @returns The decoded definition path
31
93
  * @example
32
94
  * decode('User') // type definition path
33
95
  * decode('User.name') // field definition path
34
96
  * decode('User.posts(limit)') // argument definition path
35
97
  */
36
- export const decode = (expression) => {
37
- // Handle argument path: Type.field(argument)
38
- const argMatch = expression.match(/^([^.]+)\.([^.(]+)\(([^)]+)\)$/);
39
- if (argMatch) {
40
- const [, typeName, fieldName, argName] = argMatch;
41
- if (!typeName || !fieldName || !argName)
42
- return null;
43
- return createArgumentDefinitionPath(typeName, fieldName, argName);
44
- }
45
- // Handle field path: Type.field
46
- const fieldMatch = expression.match(/^([^.]+)\.([^.]+)$/);
47
- if (fieldMatch) {
48
- const [, typeName, fieldName] = fieldMatch;
49
- if (!typeName || !fieldName)
50
- return null;
51
- return createFieldDefinitionPath(typeName, fieldName);
52
- }
53
- // Handle type path: Type
54
- const typeMatch = expression.match(/^[^.]+$/);
55
- if (typeMatch) {
56
- return createTypeDefinitionPath(expression);
57
- }
58
- return null;
59
- };
98
+ export const decodeSync = S.decodeUnknownSync(DefinitionPath);
99
+ /**
100
+ * Encode a definition path to a string expression
101
+ * @param path - The definition path to encode
102
+ * @returns A string expression representation
103
+ * @example
104
+ * encode([{ _tag: 'TypeSegment', type: 'User' }]) // 'User'
105
+ * encode([{ _tag: 'TypeSegment', type: 'User' }, { _tag: 'FieldSegment', field: 'name' }]) // 'User.name'
106
+ */
107
+ export const encodeSync = S.encodeSync(DefinitionPath);
108
+ // ============================================================================
109
+ // Helper Functions
110
+ // ============================================================================
60
111
  /**
61
112
  * Extract the type name from any definition path
62
- *
63
113
  * @param path - The definition path
64
114
  * @returns The type name
65
- * @example getType([{ kind: 'type', type: 'User' }]) // 'User'
66
115
  */
67
116
  export const getType = (path) => {
68
117
  return path[0].type;
69
118
  };
70
119
  /**
71
120
  * Extract the field name from a field or argument definition path
72
- *
73
121
  * @param path - The field or argument definition path
74
122
  * @returns The field name
75
- * @example getField([{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]) // 'name'
76
123
  */
77
124
  export const getField = (path) => {
78
125
  return path[1].field;
79
126
  };
80
127
  /**
81
128
  * Extract the argument name from an argument definition path
82
- *
83
129
  * @param path - The argument definition path
84
130
  * @returns The argument name
85
- * @example getArgument([{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]) // 'limit'
86
131
  */
87
132
  export const getArgument = (path) => {
88
133
  return path[2].argument;
89
134
  };
90
- /**
91
- * Parse field path like "User.email" into type and field names
92
- */
93
- export const parseFieldPath = (path) => {
94
- if (!path)
95
- return { typeName: null, fieldName: null };
96
- const parts = path.split('.');
97
- if (parts.length >= 2) {
98
- return {
99
- typeName: parts[0] || null,
100
- fieldName: parts[1] || null,
101
- };
102
- }
103
- return { typeName: null, fieldName: null };
104
- };
135
+ // ============================================================================
136
+ // Type Guards
137
+ // ============================================================================
105
138
  /**
106
139
  * Type guard to check if a path is a type definition path
107
- *
108
- * @param path - The path to check
109
- * @returns True if the path is a type definition path
110
140
  */
111
141
  export const isTypeDefinitionPath = (path) => {
112
- return path.length === 1 && path[0].kind === 'type';
142
+ return path.length === 1 && path[0]._tag === 'TypeSegment';
113
143
  };
114
144
  /**
115
145
  * Type guard to check if a path is a field definition path
116
- *
117
- * @param path - The path to check
118
- * @returns True if the path is a field definition path
119
146
  */
120
147
  export const isFieldDefinitionPath = (path) => {
121
- return path.length === 2 && path[0].kind === 'type' && path[1].kind === 'field';
148
+ return path.length === 2 && path[0]._tag === 'TypeSegment' && path[1]._tag === 'FieldSegment';
122
149
  };
123
150
  /**
124
151
  * Type guard to check if a path is an argument definition path
125
- *
126
- * @param path - The path to check
127
- * @returns True if the path is an argument definition path
128
152
  */
129
153
  export const isArgumentDefinitionPath = (path) => {
130
- return path.length === 3 && path[0].kind === 'type' && path[1].kind === 'field' && path[2].kind === 'argument';
131
- };
132
- /**
133
- * Create a path to a type definition
134
- *
135
- * @param type - The type name
136
- * @returns A type definition path
137
- * @example createTypeDefinitionPath('User') // [{ kind: 'type', type: 'User' }]
138
- */
139
- export const createTypeDefinitionPath = (type) => {
140
- return [createTypeSegment(type)];
141
- };
142
- /**
143
- * Create a path to a field definition
144
- *
145
- * @param type - The type name
146
- * @param field - The field name
147
- * @returns A field definition path
148
- * @example createFieldDefinitionPath('User', 'name') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]
149
- */
150
- export const createFieldDefinitionPath = (type, field) => {
151
- return [createTypeSegment(type), createFieldSegment(field)];
152
- };
153
- /**
154
- * Create a path to an argument definition
155
- *
156
- * @param type - The type name
157
- * @param field - The field name
158
- * @param argument - The argument name
159
- * @returns An argument definition path
160
- * @example createArgumentDefinitionPath('User', 'posts', 'limit') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]
161
- */
162
- export const createArgumentDefinitionPath = (type, field, argument) => {
163
- return [createTypeSegment(type), createFieldSegment(field), createArgumentSegment(argument)];
154
+ return (path.length === 3
155
+ && path[0]._tag === 'TypeSegment'
156
+ && path[1]._tag === 'FieldSegment'
157
+ && path[2]._tag === 'ArgumentSegment');
164
158
  };
159
+ // ============================================================================
160
+ // Constructor Functions
161
+ // ============================================================================
165
162
  /**
166
163
  * Create a type definition path
167
- *
168
164
  * @param type - The type name
169
165
  * @returns A type definition path
170
- * @example type('User') // [{ kind: 'type', type: 'User' }]
171
166
  */
172
- export const type = createTypeDefinitionPath;
167
+ export const type = (typeName) => {
168
+ return [TypeSegment.make({ type: typeName })];
169
+ };
173
170
  /**
174
171
  * Create a field definition path
175
- *
176
172
  * @param type - The type name
177
173
  * @param field - The field name
178
174
  * @returns A field definition path
179
- * @example field('User', 'name') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]
180
175
  */
181
- export const field = createFieldDefinitionPath;
176
+ export const field = (typeName, fieldName) => {
177
+ return [TypeSegment.make({ type: typeName }), FieldSegment.make({ field: fieldName })];
178
+ };
182
179
  /**
183
180
  * Create an argument definition path
184
- *
185
181
  * @param type - The type name
186
182
  * @param field - The field name
187
183
  * @param argument - The argument name
188
184
  * @returns An argument definition path
189
- * @example argument('User', 'posts', 'limit') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]
190
185
  */
191
- export const argument = createArgumentDefinitionPath;
186
+ export const argument = (typeName, fieldName, argumentName) => {
187
+ return [
188
+ TypeSegment.make({ type: typeName }),
189
+ FieldSegment.make({ field: fieldName }),
190
+ ArgumentSegment.make({ argument: argumentName }),
191
+ ];
192
+ };
192
193
  //# sourceMappingURL=definition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/lib/graphql-path/definition.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAIhG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAoB,EAAU,EAAE;IACrD,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACrB,CAAC;SAAM,IAAI,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;QACvC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;IAC3C,CAAC;SAAM,IAAI,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAA;IAChE,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAkB,EAAyB,EAAE;IAClE,6CAA6C;IAC7C,MAAM,QA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C,CAAC,IAAI,KAAK,cAAc;WAC/B,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,iBAAiB,CACtC,CAAA;AACH,CAAC,CAAA;AAED,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,QAAgB,EAAsB,EAAE;IAC3D,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAA;AAC/C,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,QAAgB,EAAE,SAAiB,EAAuB,EAAE;IAChF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AACxF,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAE,SAAiB,EAAE,YAAoB,EAA0B,EAAE;IAC5G,OAAO;QACL,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACpC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QACvC,eAAe,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;KACjD,CAAA;AACH,CAAC,CAAA"}
@@ -1,75 +1,43 @@
1
1
  /**
2
2
  * Query path operations
3
3
  */
4
- import type { QueryPath } from './types.js';
5
- /**
6
- * Builder class for creating query paths with a fluent interface
7
- *
8
- * @example
9
- * ```ts
10
- * const path = builder()
11
- * .type('User')
12
- * .field('posts')
13
- * .type('Post')
14
- * .field('author')
15
- * .build()
16
- * ```
17
- */
18
- export declare class QueryPathBuilder {
19
- private segments;
20
- /**
21
- * Add a type segment to the path
22
- *
23
- * @param typeName - The type name
24
- * @returns The builder for chaining
25
- */
26
- type(typeName: string): this;
27
- /**
28
- * Add a field segment to the path
29
- *
30
- * @param fieldName - The field name
31
- * @returns The builder for chaining
32
- */
33
- field(fieldName: string): this;
34
- /**
35
- * Build the final query path
36
- *
37
- * @returns The constructed query path
38
- */
39
- build(): QueryPath;
40
- }
41
- /**
42
- * Create a new query path builder
43
- *
44
- * @returns A new query path builder instance
45
- * @example
46
- * ```ts
47
- * const path = builder()
48
- * .type('User')
49
- * .field('posts')
50
- * .type('Post')
51
- * .field('author')
52
- * .build()
53
- * ```
54
- */
55
- export declare const builder: () => QueryPathBuilder;
56
4
  /**
57
5
  * Encode a query path to a human-readable expression string
6
+ * Uses the Effect Schema codec for QueryPath
58
7
  *
59
- * @param path - The query path to encode
8
+ * @param path - The query path segments to encode
60
9
  * @returns A string expression representation
61
10
  * @example
62
- * encode(builder().type('User').field('posts').type('Post').field('title').build()) // 'User.posts.Post.title'
11
+ * encode([
12
+ * { _tag: 'TypeSegment', type: 'User' },
13
+ * { _tag: 'FieldSegment', field: 'posts' },
14
+ * { _tag: 'TypeSegment', type: 'Post' },
15
+ * { _tag: 'FieldSegment', field: 'title' }
16
+ * ]) // 'User.posts.Post.title'
63
17
  */
64
- export declare const encode: (path: QueryPath) => string;
18
+ export declare const encode: (a: readonly ({
19
+ readonly _tag: "TypeSegment";
20
+ readonly type: string;
21
+ } | {
22
+ readonly _tag: "FieldSegment";
23
+ readonly field: string;
24
+ })[], overrideOptions?: import("effect/SchemaAST").ParseOptions) => string;
65
25
  /**
66
26
  * Decode a string expression into a query path
27
+ * Uses the Effect Schema codec for QueryPath
67
28
  * Note: This assumes alternating type.field.type.field pattern
68
29
  *
69
30
  * @param expression - The string expression to decode
70
- * @returns The decoded query path or null if invalid
31
+ * @returns The decoded query path segments
32
+ * @throws ParseError if the expression is invalid
71
33
  * @example
72
34
  * decode('User.posts.Post.title') // Query path traversing User->posts->Post->title
73
35
  */
74
- export declare const decode: (expression: string) => QueryPath | null;
36
+ export declare const decode: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions) => readonly ({
37
+ readonly _tag: "TypeSegment";
38
+ readonly type: string;
39
+ } | {
40
+ readonly _tag: "FieldSegment";
41
+ readonly field: string;
42
+ })[];
75
43
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-path/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,YAAY,CAAA;AAEzD;;;;;;;;;;;;GAYG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAqB;IAErC;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAK5B;;;;;OAKG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAK9B;;;;OAIG;IACH,KAAK,IAAI,SAAS;CAGnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,QAAO,gBAA0C,CAAA;AAErE;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,MAAM,SAAS,KAAG,MAMxC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,GAAI,YAAY,MAAM,KAAG,SAAS,GAAG,IAqBvD,CAAA"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-path/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;0EAA0B,CAAA;AAE7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;;;;;IAAiC,CAAA"}
@@ -1,111 +1,33 @@
1
1
  /**
2
2
  * Query path operations
3
3
  */
4
- import { createFieldSegment, createTypeSegment } from './constructors.js';
5
- /**
6
- * Builder class for creating query paths with a fluent interface
7
- *
8
- * @example
9
- * ```ts
10
- * const path = builder()
11
- * .type('User')
12
- * .field('posts')
13
- * .type('Post')
14
- * .field('author')
15
- * .build()
16
- * ```
17
- */
18
- export class QueryPathBuilder {
19
- segments = [];
20
- /**
21
- * Add a type segment to the path
22
- *
23
- * @param typeName - The type name
24
- * @returns The builder for chaining
25
- */
26
- type(typeName) {
27
- this.segments.push(createTypeSegment(typeName));
28
- return this;
29
- }
30
- /**
31
- * Add a field segment to the path
32
- *
33
- * @param fieldName - The field name
34
- * @returns The builder for chaining
35
- */
36
- field(fieldName) {
37
- this.segments.push(createFieldSegment(fieldName));
38
- return this;
39
- }
40
- /**
41
- * Build the final query path
42
- *
43
- * @returns The constructed query path
44
- */
45
- build() {
46
- return this.segments;
47
- }
48
- }
49
- /**
50
- * Create a new query path builder
51
- *
52
- * @returns A new query path builder instance
53
- * @example
54
- * ```ts
55
- * const path = builder()
56
- * .type('User')
57
- * .field('posts')
58
- * .type('Post')
59
- * .field('author')
60
- * .build()
61
- * ```
62
- */
63
- export const builder = () => new QueryPathBuilder();
4
+ import { S } from '#lib/kit-temp/effect';
5
+ import { QueryPath } from './types.js';
64
6
  /**
65
7
  * Encode a query path to a human-readable expression string
8
+ * Uses the Effect Schema codec for QueryPath
66
9
  *
67
- * @param path - The query path to encode
10
+ * @param path - The query path segments to encode
68
11
  * @returns A string expression representation
69
12
  * @example
70
- * encode(builder().type('User').field('posts').type('Post').field('title').build()) // 'User.posts.Post.title'
13
+ * encode([
14
+ * { _tag: 'TypeSegment', type: 'User' },
15
+ * { _tag: 'FieldSegment', field: 'posts' },
16
+ * { _tag: 'TypeSegment', type: 'Post' },
17
+ * { _tag: 'FieldSegment', field: 'title' }
18
+ * ]) // 'User.posts.Post.title'
71
19
  */
72
- export const encode = (path) => {
73
- return path.map(segment => {
74
- if (segment.kind === 'type')
75
- return segment.type;
76
- if (segment.kind === 'field')
77
- return segment.field;
78
- return '';
79
- }).filter(Boolean).join('.');
80
- };
20
+ export const encode = S.encodeSync(QueryPath);
81
21
  /**
82
22
  * Decode a string expression into a query path
23
+ * Uses the Effect Schema codec for QueryPath
83
24
  * Note: This assumes alternating type.field.type.field pattern
84
25
  *
85
26
  * @param expression - The string expression to decode
86
- * @returns The decoded query path or null if invalid
27
+ * @returns The decoded query path segments
28
+ * @throws ParseError if the expression is invalid
87
29
  * @example
88
30
  * decode('User.posts.Post.title') // Query path traversing User->posts->Post->title
89
31
  */
90
- export const decode = (expression) => {
91
- if (!expression)
92
- return null;
93
- const parts = expression.split('.');
94
- const segments = [];
95
- // Assume alternating pattern: type.field.type.field...
96
- for (let i = 0; i < parts.length; i++) {
97
- const part = parts[i];
98
- if (!part)
99
- continue;
100
- if (i % 2 === 0) {
101
- // Even indices are types
102
- segments.push(createTypeSegment(part));
103
- }
104
- else {
105
- // Odd indices are fields
106
- segments.push(createFieldSegment(part));
107
- }
108
- }
109
- return segments;
110
- };
32
+ export const decode = S.decodeUnknownSync(QueryPath);
111
33
  //# sourceMappingURL=query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/lib/graphql-path/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAGzE;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,gBAAgB;IACnB,QAAQ,GAAmB,EAAE,CAAA;IAErC;;;;;OAKG;IACH,IAAI,CAAC,QAAgB;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAA;QAC/C,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAiB;QACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAA;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,OAAO,I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AI,CAAC,CAAC,CAAA;QACzC,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA"}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/lib/graphql-path/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAA"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * GraphQL schema location utilities for definition paths
3
+ */
4
+ import { Grafaid } from '#lib/grafaid';
5
+ import { Either } from 'effect';
6
+ import * as Definition from './definition.js';
7
+ declare const TypeNotFoundError_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 & {
8
+ readonly _tag: "TypeNotFoundError";
9
+ } & Readonly<A>;
10
+ export declare class TypeNotFoundError extends TypeNotFoundError_base<{
11
+ typeName: string;
12
+ path: string;
13
+ }> {
14
+ }
15
+ declare const FieldNotFoundError_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 & {
16
+ readonly _tag: "FieldNotFoundError";
17
+ } & Readonly<A>;
18
+ export declare class FieldNotFoundError extends FieldNotFoundError_base<{
19
+ typeName: string;
20
+ fieldName: string;
21
+ path: string;
22
+ }> {
23
+ }
24
+ /**
25
+ * Locate a type in the GraphQL schema from a type definition path.
26
+ *
27
+ * @param schema - The GraphQL schema
28
+ * @param path - The type definition path
29
+ * @returns Either the located type or a TypeNotFoundError
30
+ */
31
+ export declare const locateType: (schema: Grafaid.Schema.Schema, path: Definition.TypeDefinitionPath) => Either.Either<Grafaid.Schema.TypesLike.Named, TypeNotFoundError>;
32
+ /**
33
+ * Locate a field in the GraphQL schema from a field definition path.
34
+ *
35
+ * @param schema - The GraphQL schema
36
+ * @param path - The field definition path
37
+ * @returns Either the located field or a FieldNotFoundError
38
+ */
39
+ export declare const locateField: (schema: Grafaid.Schema.Schema, path: Definition.FieldDefinitionPath) => Either.Either<Grafaid.Schema.NodesLike.Field, FieldNotFoundError>;
40
+ /**
41
+ * Locate a type or field in the GraphQL schema from a definition path.
42
+ *
43
+ * @param schema - The GraphQL schema
44
+ * @param path - The definition path (type or field)
45
+ * @returns Either the located type/field or an error
46
+ */
47
+ export declare const locate: (schema: Grafaid.Schema.Schema, path: Definition.DefinitionPath) => Either.Either<Grafaid.Schema.TypesLike.Named | Grafaid.Schema.NodesLike.Field, TypeNotFoundError | FieldNotFoundError>;
48
+ export {};
49
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-path/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAQ,MAAM,EAAS,MAAM,QAAQ,CAAA;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;;;;AAM7C,qBAAa,iBAAkB,SAAQ,uBAAsC;IAC3E,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;CAAG;;;;AAEL,qBAAa,kBAAmB,SAAQ,wBAAuC;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;CAAG;AAML;;;;;;GAMG;AACH,eA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