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,34 +1,67 @@
1
+ import { Grafaid } from '#lib/grafaid'
1
2
  import { GrafaidOld } from '#lib/grafaid-old'
2
- import { Box, Text } from '@radix-ui/themes'
3
- import type { GraphQLField } from 'graphql'
3
+ import { Box, Flex } from '@radix-ui/themes'
4
+ import type { GraphQLArgument, GraphQLField } from 'graphql'
4
5
  import type { FC } from 'react'
6
+ import { useAlignedColumns } from '../hooks/useAlignedColumns.js'
5
7
  import { ArgumentAnnotation } from './ArgumentAnnotation.js'
6
- import { FieldList } from './FieldList.js'
8
+ import { IAPIndicator } from './IAPIndicator.js'
7
9
 
8
10
  export interface Props {
9
11
  field: GraphQLField<any, any>
12
+ argumentNameWidth?: number
10
13
  }
11
14
 
12
- export const ArgumentListAnnotation: FC<Props> = ({ field }) => {
15
+ export const ArgumentListAnnotation: FC<Props> = ({ field, argumentNameWidth }) => {
13
16
  if (field.args.length === 0) return null
14
17
 
15
18
  const inputObject = GrafaidOld.getIAP(field)
16
- const inputObjectFields = inputObject
17
- ? (
18
- <Box pl='3' style={{ borderLeft: `1px solid var(--gray-6)` }}>
19
- <FieldList data={inputObject} />
19
+
20
+ // If it's IAP, show indicator and input object's fields directly
21
+ if (inputObject) {
22
+ const inputFields = Grafaid.Schema.NodesLike.getFields(inputObject)
23
+ const nameWidth = argumentNameWidth ?? useAlignedColumns(inputFields, field => field.name)
24
+
25
+ return (
26
+ <Box>
27
+ <Flex direction='column' gap='2'>
28
+ {/* Small IAP indicator */}
29
+ <Box ml='3'>
30
+ <IAPIndicator inputObject={inputObject} />
31
+ </Box>
32
+
33
+ {/* Show input object fields directly without header */}
34
+ {inputFields.map(field => (
35
+ <Box key={field.name} ml='3'>
36
+ <ArgumentAnnotation
37
+ data={{
38
+ name: field.name,
39
+ type: field.type,
40
+ description: field.description,
41
+ defaultValue: (field as any).defaultValue,
42
+ deprecationReason: (field as any).deprecationReason,
43
+ } as GraphQLArgument}
44
+ nameWidth={nameWidth}
45
+ />
46
+ </Box>
47
+ ))}
48
+ </Flex>
20
49
  </Box>
21
50
  )
22
- : null
51
+ }
52
+
53
+ // Regular non-IAP arguments
54
+ const nameWidth = argumentNameWidth ?? useAlignedColumns([...field.args], arg => arg.name)
23
55
 
24
56
  return (
25
- <>
26
- <Text>(</Text>
27
- <Box ml='2'>
28
- {field.args.map(arg => <ArgumentAnnotation key={arg.name} data={arg} />)}
29
- {inputObjectFields}
30
- </Box>
31
- <Text>)</Text>
32
- </>
57
+ <Box>
58
+ <Flex direction='column' gap='2'>
59
+ {field.args.map(arg => (
60
+ <Box key={arg.name} ml='3'>
61
+ <ArgumentAnnotation data={arg} nameWidth={nameWidth} />
62
+ </Box>
63
+ ))}
64
+ </Flex>
65
+ </Box>
33
66
  )
34
67
  }
@@ -1,4 +1,3 @@
1
- import { Change as GraphqlChange } from '#lib/change/$'
2
1
  import { Code } from '@radix-ui/themes'
3
2
  import type React from 'react'
4
3
  import { ChangeBase } from '../ChangeBase.js'
@@ -25,6 +25,7 @@ export const CodeBlock: React.FC<CodeBlockProps> = ({ codeblock, schema }) => {
25
25
  codeblock={codeblock}
26
26
  schema={schema}
27
27
  showWarningIfNoSchema={templateConfig.warnings.interactiveWithoutSchema.enabled}
28
+ referenceEnabled={templateConfig.reference.enabled}
28
29
  />
29
30
  )
30
31
  }
@@ -9,7 +9,7 @@ export const Description: React.FC<{ data: GraphQLNamedType | GrafaidOld.GraphQL
9
9
  if (!data.description) return null
10
10
 
11
11
  return (
12
- <Text as='div' color='gray'>
12
+ <Text as='div' size='2' color='gray' style={{ lineHeight: '1.5' }}>
13
13
  <Markdown>{data.description}</Markdown>
14
14
  </Text>
15
15
  )
@@ -1,6 +1,7 @@
1
1
  import type { ExampleReference } from '#api/examples/schemas/type-usage-index'
2
2
  import { Version } from '#lib/version/$'
3
3
  import { Badge, Link } from '@radix-ui/themes'
4
+ import { Str } from '@wollybeard/kit'
4
5
  import type { FC } from 'react'
5
6
 
6
7
  export interface Props {
@@ -20,7 +21,7 @@ export const ExampleLink: FC<Props> = ({ exampleRef }) => {
20
21
  return (
21
22
  <Link href={href} style={{ textDecoration: 'none' }}>
22
23
  <Badge variant='soft' size='2' style={{ cursor: 'pointer' }}>
23
- {exampleRef.name}
24
+ {Str.titlizeSlug(exampleRef.name)}
24
25
  </Badge>
25
26
  </Link>
26
27
  )
@@ -3,8 +3,11 @@ import type { React } from '#dep/react/index'
3
3
  import { GrafaidOld } from '#lib/grafaid-old'
4
4
  import { Lifecycles } from '#lib/lifecycles/$'
5
5
  import type { BoxProps } from '@radix-ui/themes'
6
- import { Badge, Box, Text } from '@radix-ui/themes'
6
+ import { Badge, Box, Card, Flex, HoverCard, Link, Text } from '@radix-ui/themes'
7
+ import { isNonNullType } from 'graphql'
7
8
  import { useSchema } from '../contexts/GraphqlLifecycleContext.js'
9
+ import { useReferenceConfig } from '../contexts/ReferenceConfigContext.js'
10
+ import { useViewMode } from '../contexts/ViewModeContext.js'
8
11
  import { ArgumentListAnnotation } from './ArgumentListAnnotation.js'
9
12
  import { DeprecationReason } from './DeprecationReason.js'
10
13
  import { Description } from './Description.js'
@@ -15,14 +18,23 @@ export const Field: React.FC<
15
18
  BoxProps & {
16
19
  data: GrafaidOld.GraphQLField
17
20
  parentTypeName?: string
21
+ fieldNameWidth?: number
22
+ argumentNameWidth?: number
18
23
  }
19
- > = ({ data, parentTypeName, ...boxProps }) => {
24
+ > = ({ data, parentTypeName, fieldNameWidth, argumentNameWidth, ...boxProps }) => {
20
25
  const { schema, lifecycles } = useSchema()
26
+ const { viewMode } = useViewMode()
27
+ const referenceConfig = useReferenceConfig()
21
28
 
22
29
  const argumentList = GrafaidOld.isOutputField(data)
23
- ? <ArgumentListAnnotation field={data} />
30
+ ? argumentNameWidth !== undefined
31
+ ? <ArgumentListAnnotation field={data} argumentNameWidth={argumentNameWidth} />
32
+ : <ArgumentListAnnotation field={data} />
24
33
  : null
25
34
 
35
+ // Check if the field is nullable (for questionMark mode)
36
+ const isFieldNullable = !isNonNullType(data.type)
37
+
26
38
  // Get field lifecycle information if available
27
39
  const since = parentTypeName
28
40
  ? Lifecycles.getFieldSince(lifecycles, parentTypeName, data.name, schema)
@@ -31,24 +43,140 @@ export const Field: React.FC<
31
43
  ? Lifecycles.getFieldRemovedDate(lifecycles, parentTypeName, data.name, schema)
32
44
  : null
33
45
 
46
+ // Only show since badge if it's NOT the initial version
47
+ const showSinceBadge = since && since._tag !== 'initial'
48
+
34
49
  return (
35
- <Box {...boxProps} id={data.name}>
36
- <Description data={data} />
50
+ <Card
51
+ {...boxProps}
52
+ variant='ghost'
53
+ id={data.name}
54
+ style={{ overflow: 'visible' }}
55
+ >
56
+ {/* Field name and return type with aligned columns */}
57
+ <style>
58
+ {`
59
+ .field-name-anchor {
60
+ position: absolute;
61
+ left: 0;
62
+ top: 50%;
63
+ transform: translateY(-50%) translateX(0);
64
+ opacity: 0;
65
+ transition: all 0.2s ease-in-out;
66
+ pointer-events: none;
67
+ z-index: 10;
68
+ }
69
+
70
+ .field-name-wrapper:hover .field-name-anchor {
71
+ transform: translateY(-50%) translateX(-24px);
72
+ opacity: 1;
73
+ pointer-events: auto;
74
+ }
75
+ `}
76
+ </style>
77
+ <Flex align='baseline' mb='2' gap='2'>
78
+ <Box
79
+ className='field-name-wrapper'
80
+ style={{
81
+ minWidth: fieldNameWidth ? `${fieldNameWidth}ch` : 'auto',
82
+ flexShrink: 0,
83
+ position: 'relative',
84
+ }}
85
+ >
86
+ {/* Anchor icon that slides left on hover */}
87
+ <Link
88
+ className='field-name-anchor'
89
+ href={`#${data.name}`}
90
+ color='gray'
91
+ style={{
92
+ textDecoration: 'none',
93
+ display: 'inline-flex',
94
+ alignItems: 'center',
95
+ }}
96
+ >
97
+ <Text size='3' color='gray'>
98
+ #
99
+ </Text>
100
+ </Link>
101
+ {viewMode === 'compact' && data.description
102
+ ? (
103
+ <HoverCard.Root>
104
+ <HoverCard.Trigger>
105
+ <Link
106
+ href={`#${data.name}`}
107
+ color='gray'
108
+ underline='hover'
109
+ style={{ textDecoration: 'none', display: 'inline-block' }}
110
+ >
111
+ <Text size='3' weight='bold'>
112
+ {data.name}
113
+ {referenceConfig.nullabilityRendering === 'questionMark' && isFieldNullable && '?'}
114
+ </Text>
115
+ </Link>
116
+ </HoverCard.Trigger>
117
+ <HoverCard.Content
118
+ size='2'
119
+ maxWidth='400px'
120
+ side='top'
121
+ align='center'
122
+ >
123
+ <Text size='2' color='gray'>
124
+ <Description data={data} />
125
+ </Text>
126
+ </HoverCard.Content>
127
+ </HoverCard.Root>
128
+ )
129
+ : (
130
+ <Link
131
+ href={`#${data.name}`}
132
+ color='gray'
133
+ underline='hover'
134
+ style={{ textDecoration: 'none', display: 'inline-block' }}
135
+ >
136
+ <Text size='3' weight='bold'>
137
+ {data.name}
138
+ {referenceConfig.nullabilityRendering === 'questionMark' && isFieldNullable && '?'}
139
+ </Text>
140
+ </Link>
141
+ )}
142
+ </Box>
143
+ <TypeAnnotation
144
+ type={data.type}
145
+ showDescription={true}
146
+ nullabilityRendering={referenceConfig.nullabilityRendering}
147
+ />
148
+ </Flex>
149
+
150
+ {/* Badges below the header line */}
151
+ {(showSinceBadge || removedDate) && (
152
+ <Flex gap='2' mb='2'>
153
+ {showSinceBadge && <SinceBadge since={since} />}
154
+ {removedDate && (
155
+ <Badge color='red' variant='soft' size='1'>
156
+ Removed {Api.Schema.dateToVersionString(removedDate)}
157
+ </Badge>
158
+ )}
159
+ </Flex>
160
+ )}
161
+
162
+ {/* Description below title (only in expanded mode) */}
163
+ {data.description && viewMode === 'expanded' && (
164
+ <Box mb='2'>
165
+ <Text size='2' color='gray' style={{ lineHeight: '1.5' }}>
166
+ <Description data={data} />
167
+ </Text>
168
+ </Box>
169
+ )}
170
+
171
+ {/* Deprecation reason if exists */}
37
172
  <DeprecationReason data={data} />
38
- <Box style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
39
- <Text weight='medium'>{data.name}</Text>
40
- {since && <SinceBadge since={since} />}
41
- {removedDate && (
42
- <Badge color='red' variant='soft' size='1'>
43
- Removed {Api.Schema.dateToVersionString(removedDate)}
44
- </Badge>
45
- )}
46
- </Box>
47
- <Text>
48
- {argumentList}
49
- :{` `}
50
- <TypeAnnotation type={data.type} />
51
- </Text>
52
- </Box>
173
+
174
+ {/* Arguments section below, with left border - only show if field has arguments */}
175
+ {argumentList && GrafaidOld.isOutputField(data) && data.args.length > 0 && (
176
+ <Box mt='2' ml='3' pl='3' style={{ borderLeft: '2px solid var(--gray-4)' }}>
177
+ {argumentList}
178
+ </Box>
179
+ )}
180
+ </Card>
53
181
  )
54
182
  }
@@ -1,29 +1,44 @@
1
1
  import { Grafaid } from '#lib/grafaid'
2
- import { Box } from '@radix-ui/themes'
3
- import type { FC } from 'react'
2
+ import { GrafaidOld } from '#lib/grafaid-old'
3
+ import { Box, Flex } from '@radix-ui/themes'
4
+ import { type FC } from 'react'
5
+ import { useAlignedColumns } from '../hooks/useAlignedColumns.js'
4
6
  import { Field } from './Field.js'
5
7
 
6
8
  export interface Props {
7
9
  data: Grafaid.Schema.TypesLike.Named
8
10
  parentTypeName?: string
11
+ argumentNameWidth?: number
9
12
  }
10
13
 
11
- export const FieldList: FC<Props> = ({ data, parentTypeName }) => {
14
+ export const FieldList: FC<Props> = ({ data, parentTypeName, argumentNameWidth }) => {
12
15
  if (!Grafaid.Schema.TypesLike.isFielded(data)) return null
13
16
 
14
17
  const fields = Grafaid.Schema.NodesLike.getFields(data)
15
18
  if (fields.length === 0) return null
16
19
 
20
+ // Calculate the maximum field name length for alignment using shared hook
21
+ const fieldNameWidth = useAlignedColumns(fields, field => field.name)
22
+
17
23
  return (
18
- <Box>
19
- {fields.map(field => (
20
- <Field
21
- mt='3'
22
- key={field.name}
23
- data={field}
24
- parentTypeName={parentTypeName ?? data.name}
25
- />
26
- ))}
27
- </Box>
24
+ <Flex direction='column'>
25
+ {fields.map((field, index) => {
26
+ // Check if this field has arguments
27
+ const hasArguments = GrafaidOld.isOutputField(field) && field.args.length > 0
28
+ // Add extra spacing after fields with arguments
29
+ const marginBottom = hasArguments ? '5' : '3'
30
+
31
+ return (
32
+ <Box key={field.name} mb={index < fields.length - 1 ? marginBottom : '0'}>
33
+ <Field
34
+ data={field}
35
+ parentTypeName={parentTypeName ?? data.name}
36
+ fieldNameWidth={fieldNameWidth}
37
+ {...(argumentNameWidth !== undefined ? { argumentNameWidth } : {})}
38
+ />
39
+ </Box>
40
+ )
41
+ })}
42
+ </Flex>
28
43
  )
29
44
  }
@@ -1,7 +1,9 @@
1
1
  import type { React } from '#dep/react/index'
2
2
  import { Grafaid } from '#lib/grafaid'
3
+ import { GrafaidOld } from '#lib/grafaid-old'
3
4
  import { Box, Heading } from '@radix-ui/themes'
4
5
  import type { GraphQLNamedType } from 'graphql'
6
+ import { useAlignedColumns } from '../hooks/useAlignedColumns.js'
5
7
  import { FieldList } from './FieldList.js'
6
8
 
7
9
  export const FieldListSection: React.FC<{ data: GraphQLNamedType }> = ({ data }) => {
@@ -10,10 +12,18 @@ export const FieldListSection: React.FC<{ data: GraphQLNamedType }> = ({ data })
10
12
  const fields = Grafaid.Schema.NodesLike.getFields(data)
11
13
  if (fields.length === 0) return null
12
14
 
15
+ // Calculate the maximum argument name width across ALL fields of this type
16
+ const allArguments = fields.flatMap(field => GrafaidOld.isOutputField(field) ? field.args : [])
17
+ const argumentNameWidth = useAlignedColumns(allArguments, arg => arg.name)
18
+
13
19
  return (
14
20
  <Box>
15
- <Heading>Fields</Heading>
16
- <FieldList data={data} parentTypeName={data.name} />
21
+ <Heading size='5' mb='4' weight='medium'>Fields</Heading>
22
+ <FieldList
23
+ data={data}
24
+ parentTypeName={data.name}
25
+ argumentNameWidth={argumentNameWidth}
26
+ />
17
27
  </Box>
18
28
  )
19
29
  }
@@ -3,6 +3,7 @@ import { Document } from '#lib/document/$'
3
3
  import { VersionCoverage } from '#lib/version-coverage'
4
4
  import { Either, Option } from 'effect'
5
5
  import * as React from 'react'
6
+ import { templateConfig } from 'virtual:polen/project/config'
6
7
  import { useHighlighted } from '../hooks/use-highlighted.js'
7
8
  import { GraphQLInteractive } from './GraphQLInteractive/GraphQLInteractive.js'
8
9
  import { VersionCoveragePicker } from './VersionCoveragePicker.js'
@@ -72,6 +73,7 @@ export const GraphQLDocument: React.FC<GraphQLDocumentProps> = ({
72
73
  <GraphQLInteractive
73
74
  codeblock={highlightedCode}
74
75
  schema={schema?.definition}
76
+ referenceEnabled={templateConfig.reference.enabled}
75
77
  style={style}
76
78
  toolbar={() => (
77
79
  showVersionCoveragePicker && selectedVersionCoverage && (
@@ -29,6 +29,9 @@ interface GraphQLInteractiveProps {
29
29
  /** Whether to show a warning indicator when schema is missing */
30
30
  showWarningIfNoSchema?: boolean | undefined
31
31
 
32
+ /** Whether reference documentation is enabled (controls if types link to reference) */
33
+ referenceEnabled?: boolean | undefined
34
+
32
35
  /** Optional toolbar component to render (e.g., version picker) */
33
36
  toolbar?: () => React.ReactNode
34
37
 
@@ -53,6 +56,7 @@ const GraphQLInteractiveImpl: React.FC<GraphQLInteractiveProps> = ({
53
56
  codeblock,
54
57
  schema,
55
58
  showWarningIfNoSchema = true,
59
+ referenceEnabled = true,
56
60
  toolbar,
57
61
  style,
58
62
  }) => {
@@ -86,6 +90,7 @@ const GraphQLInteractiveImpl: React.FC<GraphQLInteractiveProps> = ({
86
90
  codeblock.code,
87
91
  codeblock.annotations,
88
92
  schema, // Pass the schema for semantic analysis
93
+ referenceEnabled, // Pass reference enabled flag for link generation
89
94
  )
90
95
 
91
96
  setTokens(parsedTokens)
@@ -98,7 +103,7 @@ const GraphQLInteractiveImpl: React.FC<GraphQLInteractiveProps> = ({
98
103
  } finally {
99
104
  setIsLoading(false)
100
105
  }
101
- }, [codeblock.code, codeblock.annotations, schema])
106
+ }, [codeblock.code, codeblock.annotations, schema, referenceEnabled])
102
107
 
103
108
  // Retry function for users
104
109
  const handleRetry = ReactHooks.useCallback(() => {
@@ -109,11 +109,13 @@ class UnifiedToken implements GraphQLToken {
109
109
  private _start: number
110
110
  private _end: number
111
111
  private _nodeType: TreeSitterGraphQLNodeType
112
+ private _referenceEnabled: boolean
112
113
 
113
114
  constructor(
114
115
  public treeSitterNode: WebTreeSitter.Node,
115
116
  public semantic: SemanticNode | undefined,
116
117
  annotations: CodeAnnotation[],
118
+ referenceEnabled = true,
117
119
  ) {
118
120
  // Cache the values immediately to avoid WASM access issues later
119
121
  // This works for both real WebTreeSitter nodes and synthetic nodes
@@ -121,6 +123,7 @@ class UnifiedToken implements GraphQLToken {
121
123
  this._start = treeSitterNode.startIndex
122
124
  this._end = treeSitterNode.endIndex
123
125
  this._nodeType = treeSitterNode.type as TreeSitterGraphQLNodeType
126
+ this._referenceEnabled = referenceEnabled
124
127
 
125
128
  this.codeHike = { annotations }
126
129
 
@@ -255,6 +258,8 @@ class UnifiedToken implements GraphQLToken {
255
258
  }
256
259
 
257
260
  private _getReferenceUrl(): string | null {
261
+ // If reference is disabled, don't generate URLs
262
+ if (!this._referenceEnabled) return null
258
263
  if (!this.semantic) return null
259
264
 
260
265
  // Arguments - use #<field>__<argument> pattern
@@ -536,6 +541,7 @@ export async function parseGraphQLWithTreeSitterEither(
536
541
  code: string,
537
542
  annotations: CodeAnnotation[] = [],
538
543
  schema?: GraphQLSchema,
544
+ referenceEnabled = true,
539
545
  ): Promise<Either.Either<GraphQLToken[], ParseError>> {
540
546
  // Validate input
541
547
  if (!code || typeof code !== 'string') {
@@ -566,10 +572,10 @@ export async function parseGraphQLWithTreeSitterEither(
566
572
 
567
573
  try {
568
574
  // Step 2: Walk tree and attach semantics
569
- const tokens = collectTokensWithSemantics(tree, code, schema, annotations)
575
+ const tokens = collectTokensWithSemantics(tree, code, schema, annotations, referenceEnabled)
570
576
 
571
577
  // Step 3: Add error hint tokens after invalid fields
572
- const tokensWithHints = addErrorHintTokens(tokens, code, annotations)
578
+ const tokensWithHints = addErrorHintTokens(tokens, code, annotations, referenceEnabled)
573
579
 
574
580
  return Either.right(tokensWithHints)
575
581
  } catch (error) {
@@ -595,8 +601,9 @@ export async function parseGraphQLWithTreeSitter(
595
601
  code: string,
596
602
  annotations: CodeAnnotation[] = [],
597
603
  schema?: GraphQLSchema,
604
+ referenceEnabled = true,
598
605
  ): Promise<GraphQLToken[]> {
599
- const result = await parseGraphQLWithTreeSitterEither(code, annotations, schema)
606
+ const result = await parseGraphQLWithTreeSitterEither(code, annotations, schema, referenceEnabled)
600
607
 
601
608
  if (Either.isLeft(result)) {
602
609
  const error = result.left
@@ -714,6 +721,7 @@ function addErrorHintTokens(
714
721
  tokens: GraphQLToken[],
715
722
  code: string,
716
723
  annotations: CodeAnnotation[],
724
+ referenceEnabled = true,
717
725
  ): GraphQLToken[] {
718
726
  const tokensWithHints: GraphQLToken[] = []
719
727
  const processedIndices = new Set<number>()
@@ -792,6 +800,7 @@ function addErrorHintTokens(
792
800
  ),
793
801
  undefined,
794
802
  annotations,
803
+ referenceEnabled,
795
804
  )
796
805
  tokensWithHints.push(hintToken)
797
806
  }
@@ -808,6 +817,7 @@ function collectTokensWithSemantics(
808
817
  code: string,
809
818
  schema: GraphQLSchema | undefined,
810
819
  annotations: CodeAnnotation[],
820
+ referenceEnabled = true,
811
821
  ): GraphQLToken[] {
812
822
  const tokens: GraphQLToken[] = []
813
823
  const cursor = tree.walk()
@@ -861,6 +871,7 @@ function collectTokensWithSemantics(
861
871
  createWhitespaceNode(whitespace, lastEnd, node.startIndex),
862
872
  undefined,
863
873
  annotations,
874
+ referenceEnabled,
864
875
  ),
865
876
  )
866
877
  }
@@ -1009,6 +1020,7 @@ function collectTokensWithSemantics(
1009
1020
  node,
1010
1021
  semantic,
1011
1022
  annotations,
1023
+ referenceEnabled,
1012
1024
  )
1013
1025
 
1014
1026
  tokens.push(token)
@@ -1050,6 +1062,7 @@ function collectTokensWithSemantics(
1050
1062
  createWhitespaceNode(remaining, lastEnd, code.length),
1051
1063
  undefined,
1052
1064
  annotations,
1065
+ referenceEnabled,
1053
1066
  ),
1054
1067
  )
1055
1068
  }
@@ -0,0 +1,73 @@
1
+ import { InfoCircledIcon } from '@radix-ui/react-icons'
2
+ import { Box, Flex, HoverCard, Separator, Text } from '@radix-ui/themes'
3
+ import type { GraphQLInputObjectType } from 'graphql'
4
+ import type { FC } from 'react'
5
+ import { TypeLink } from './graphql/type-link.js'
6
+
7
+ interface Props {
8
+ inputObject: GraphQLInputObjectType
9
+ }
10
+
11
+ /**
12
+ * Indicator for Input Argument Pattern (IAP) - shows when a field
13
+ * has a single 'input' argument with an Input Object type
14
+ */
15
+ export const IAPIndicator: FC<Props> = ({ inputObject }) => {
16
+ return (
17
+ <HoverCard.Root>
18
+ <HoverCard.Trigger>
19
+ <Flex
20
+ align='center'
21
+ gap='1'
22
+ style={{
23
+ cursor: 'pointer',
24
+ opacity: 0.7,
25
+ display: 'inline-flex',
26
+ }}
27
+ >
28
+ <InfoCircledIcon style={{ width: 12, height: 12 }} />
29
+ <Text size='1' color='gray'>input</Text>
30
+ </Flex>
31
+ </HoverCard.Trigger>
32
+ <HoverCard.Content size='2' maxWidth='400px'>
33
+ <Flex direction='column' gap='3'>
34
+ <Flex direction='column' gap='2'>
35
+ <Box>
36
+ <TypeLink type={inputObject} />
37
+ </Box>
38
+ {inputObject.description && (
39
+ <Text size='2' color='gray' style={{ lineHeight: '1.5' }}>
40
+ {inputObject.description}
41
+ </Text>
42
+ )}
43
+ </Flex>
44
+ {inputObject.description && <Separator size='4' />}
45
+ <Flex direction='column' gap='2'>
46
+ <Text size='2' color='gray'>
47
+ This field uses an input-only argument pattern. The fields shown below belong to the input object, not
48
+ direct field arguments.
49
+ </Text>
50
+ <Box>
51
+ <Text size='1' color='gray' weight='medium'>
52
+ Example usage:
53
+ </Text>
54
+ <Box
55
+ mt='1'
56
+ style={{
57
+ padding: '8px',
58
+ backgroundColor: 'var(--gray-2)',
59
+ borderRadius: '4px',
60
+ fontFamily: 'var(--code-font-family)',
61
+ }}
62
+ >
63
+ <Text size='1' style={{ whiteSpace: 'pre' }}>
64
+ {`mutation {\n fieldName(input: { a: 1, b: "value", ... }) {\n ...\n }\n}`}
65
+ </Text>
66
+ </Box>
67
+ </Box>
68
+ </Flex>
69
+ </Flex>
70
+ </HoverCard.Content>
71
+ </HoverCard.Root>
72
+ )
73
+ }