@gqlkit-ts/cli 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/dist/auto-type-generator/auto-type-generator.d.ts +26 -4
  2. package/dist/auto-type-generator/auto-type-generator.d.ts.map +1 -1
  3. package/dist/auto-type-generator/auto-type-generator.js +846 -152
  4. package/dist/auto-type-generator/auto-type-generator.js.map +1 -1
  5. package/dist/auto-type-generator/index.d.ts +9 -2
  6. package/dist/auto-type-generator/index.d.ts.map +1 -1
  7. package/dist/auto-type-generator/index.js +3 -0
  8. package/dist/auto-type-generator/index.js.map +1 -1
  9. package/dist/auto-type-generator/inline-enum-collector.d.ts +39 -0
  10. package/dist/auto-type-generator/inline-enum-collector.d.ts.map +1 -0
  11. package/dist/auto-type-generator/inline-enum-collector.js +193 -0
  12. package/dist/auto-type-generator/inline-enum-collector.js.map +1 -0
  13. package/dist/auto-type-generator/inline-object-traverser.d.ts +20 -0
  14. package/dist/auto-type-generator/inline-object-traverser.d.ts.map +1 -0
  15. package/dist/auto-type-generator/inline-object-traverser.js +22 -0
  16. package/dist/auto-type-generator/inline-object-traverser.js.map +1 -0
  17. package/dist/auto-type-generator/inline-union-collector.d.ts +29 -0
  18. package/dist/auto-type-generator/inline-union-collector.d.ts.map +1 -0
  19. package/dist/auto-type-generator/inline-union-collector.js +216 -0
  20. package/dist/auto-type-generator/inline-union-collector.js.map +1 -0
  21. package/dist/auto-type-generator/inline-union-types.d.ts +29 -0
  22. package/dist/auto-type-generator/inline-union-types.d.ts.map +1 -0
  23. package/dist/auto-type-generator/inline-union-types.js +2 -0
  24. package/dist/auto-type-generator/inline-union-types.js.map +1 -0
  25. package/dist/auto-type-generator/inline-union-validator.d.ts +76 -0
  26. package/dist/auto-type-generator/inline-union-validator.d.ts.map +1 -0
  27. package/dist/auto-type-generator/inline-union-validator.js +329 -0
  28. package/dist/auto-type-generator/inline-union-validator.js.map +1 -0
  29. package/dist/auto-type-generator/naming-convention.d.ts +22 -1
  30. package/dist/auto-type-generator/naming-convention.d.ts.map +1 -1
  31. package/dist/auto-type-generator/naming-convention.js +24 -0
  32. package/dist/auto-type-generator/naming-convention.js.map +1 -1
  33. package/dist/auto-type-generator/resolve-type-generator.d.ts +20 -0
  34. package/dist/auto-type-generator/resolve-type-generator.d.ts.map +1 -0
  35. package/dist/auto-type-generator/resolve-type-generator.js +2 -0
  36. package/dist/auto-type-generator/resolve-type-generator.js.map +1 -0
  37. package/dist/auto-type-generator/resolver-field-iterator.d.ts +13 -0
  38. package/dist/auto-type-generator/resolver-field-iterator.d.ts.map +1 -0
  39. package/dist/auto-type-generator/resolver-field-iterator.js +22 -0
  40. package/dist/auto-type-generator/resolver-field-iterator.js.map +1 -0
  41. package/dist/auto-type-generator/typename-extractor.d.ts +26 -0
  42. package/dist/auto-type-generator/typename-extractor.d.ts.map +1 -0
  43. package/dist/auto-type-generator/typename-extractor.js +142 -0
  44. package/dist/auto-type-generator/typename-extractor.js.map +1 -0
  45. package/dist/auto-type-generator/typename-resolve-type-generator.d.ts +35 -0
  46. package/dist/auto-type-generator/typename-resolve-type-generator.d.ts.map +1 -0
  47. package/dist/auto-type-generator/typename-resolve-type-generator.js +177 -0
  48. package/dist/auto-type-generator/typename-resolve-type-generator.js.map +1 -0
  49. package/dist/auto-type-generator/typename-types.d.ts +43 -0
  50. package/dist/auto-type-generator/typename-types.d.ts.map +1 -0
  51. package/dist/auto-type-generator/typename-types.js +37 -0
  52. package/dist/auto-type-generator/typename-types.js.map +1 -0
  53. package/dist/auto-type-generator/typename-validator.d.ts +37 -0
  54. package/dist/auto-type-generator/typename-validator.d.ts.map +1 -0
  55. package/dist/auto-type-generator/typename-validator.js +206 -0
  56. package/dist/auto-type-generator/typename-validator.js.map +1 -0
  57. package/dist/cli.js +2 -0
  58. package/dist/cli.js.map +1 -1
  59. package/dist/commands/docs.d.ts +51 -0
  60. package/dist/commands/docs.d.ts.map +1 -0
  61. package/dist/commands/docs.js +154 -0
  62. package/dist/commands/docs.js.map +1 -0
  63. package/dist/gen-orchestrator/orchestrator.d.ts.map +1 -1
  64. package/dist/gen-orchestrator/orchestrator.js +119 -14
  65. package/dist/gen-orchestrator/orchestrator.js.map +1 -1
  66. package/dist/resolver-extractor/extract-resolvers.d.ts +28 -1
  67. package/dist/resolver-extractor/extract-resolvers.d.ts.map +1 -1
  68. package/dist/resolver-extractor/extractor/define-api-extractor.d.ts +16 -1
  69. package/dist/resolver-extractor/extractor/define-api-extractor.d.ts.map +1 -1
  70. package/dist/resolver-extractor/extractor/define-api-extractor.js +86 -309
  71. package/dist/resolver-extractor/extractor/define-api-extractor.js.map +1 -1
  72. package/dist/resolver-extractor/index.d.ts +0 -1
  73. package/dist/resolver-extractor/index.d.ts.map +1 -1
  74. package/dist/resolver-extractor/validator/abstract-resolver-validator.d.ts +1 -0
  75. package/dist/resolver-extractor/validator/abstract-resolver-validator.d.ts.map +1 -1
  76. package/dist/resolver-extractor/validator/abstract-resolver-validator.js +9 -5
  77. package/dist/resolver-extractor/validator/abstract-resolver-validator.js.map +1 -1
  78. package/dist/schema-generator/emitter/code-emitter.d.ts +10 -2
  79. package/dist/schema-generator/emitter/code-emitter.d.ts.map +1 -1
  80. package/dist/schema-generator/emitter/code-emitter.js +39 -4
  81. package/dist/schema-generator/emitter/code-emitter.js.map +1 -1
  82. package/dist/schema-generator/generate-schema.d.ts +1 -0
  83. package/dist/schema-generator/generate-schema.d.ts.map +1 -1
  84. package/dist/schema-generator/generate-schema.js +90 -4
  85. package/dist/schema-generator/generate-schema.js.map +1 -1
  86. package/dist/schema-generator/integrator/result-integrator.d.ts +34 -2
  87. package/dist/schema-generator/integrator/result-integrator.d.ts.map +1 -1
  88. package/dist/schema-generator/integrator/result-integrator.js +96 -1
  89. package/dist/schema-generator/integrator/result-integrator.js.map +1 -1
  90. package/dist/schema-generator/resolver-collector/resolver-collector.d.ts +2 -0
  91. package/dist/schema-generator/resolver-collector/resolver-collector.d.ts.map +1 -1
  92. package/dist/schema-generator/resolver-collector/resolver-collector.js +22 -0
  93. package/dist/schema-generator/resolver-collector/resolver-collector.js.map +1 -1
  94. package/dist/shared/constants.d.ts +0 -16
  95. package/dist/shared/constants.d.ts.map +1 -1
  96. package/dist/shared/constants.js +0 -19
  97. package/dist/shared/constants.js.map +1 -1
  98. package/dist/shared/directive-detector.d.ts.map +1 -1
  99. package/dist/shared/directive-detector.js +8 -15
  100. package/dist/shared/directive-detector.js.map +1 -1
  101. package/dist/shared/enum-prefix-detector.d.ts +63 -0
  102. package/dist/shared/enum-prefix-detector.d.ts.map +1 -0
  103. package/dist/shared/enum-prefix-detector.js +80 -0
  104. package/dist/shared/enum-prefix-detector.js.map +1 -0
  105. package/dist/shared/file-scanner.d.ts.map +1 -1
  106. package/dist/shared/file-scanner.js +5 -3
  107. package/dist/shared/file-scanner.js.map +1 -1
  108. package/dist/shared/ignore-fields-detector.d.ts +26 -0
  109. package/dist/shared/ignore-fields-detector.d.ts.map +1 -0
  110. package/dist/shared/ignore-fields-detector.js +83 -0
  111. package/dist/shared/ignore-fields-detector.js.map +1 -0
  112. package/dist/shared/ignore-fields-validator.d.ts +29 -0
  113. package/dist/shared/ignore-fields-validator.d.ts.map +1 -0
  114. package/dist/shared/ignore-fields-validator.js +43 -0
  115. package/dist/shared/ignore-fields-validator.js.map +1 -0
  116. package/dist/shared/index.d.ts +3 -1
  117. package/dist/shared/index.d.ts.map +1 -1
  118. package/dist/shared/index.js +1 -3
  119. package/dist/shared/index.js.map +1 -1
  120. package/dist/shared/interface-detector.d.ts +3 -2
  121. package/dist/shared/interface-detector.d.ts.map +1 -1
  122. package/dist/shared/interface-detector.js +54 -11
  123. package/dist/shared/interface-detector.js.map +1 -1
  124. package/dist/shared/path-utils.d.ts +2 -0
  125. package/dist/shared/path-utils.d.ts.map +1 -0
  126. package/dist/shared/path-utils.js +4 -0
  127. package/dist/shared/path-utils.js.map +1 -0
  128. package/dist/shared/source-location.d.ts +5 -0
  129. package/dist/shared/source-location.d.ts.map +1 -1
  130. package/dist/shared/source-location.js +7 -0
  131. package/dist/shared/source-location.js.map +1 -1
  132. package/dist/shared/type-converter.d.ts.map +1 -1
  133. package/dist/shared/type-converter.js +11 -0
  134. package/dist/shared/type-converter.js.map +1 -1
  135. package/dist/shared/typescript-utils.d.ts +34 -7
  136. package/dist/shared/typescript-utils.d.ts.map +1 -1
  137. package/dist/shared/typescript-utils.js +72 -24
  138. package/dist/shared/typescript-utils.js.map +1 -1
  139. package/dist/type-extractor/collector/scalar-collector.d.ts.map +1 -1
  140. package/dist/type-extractor/collector/scalar-collector.js +4 -14
  141. package/dist/type-extractor/collector/scalar-collector.js.map +1 -1
  142. package/dist/type-extractor/converter/graphql-converter.d.ts.map +1 -1
  143. package/dist/type-extractor/converter/graphql-converter.js +57 -4
  144. package/dist/type-extractor/converter/graphql-converter.js.map +1 -1
  145. package/dist/type-extractor/extractor/field-type-resolver.d.ts +28 -0
  146. package/dist/type-extractor/extractor/field-type-resolver.d.ts.map +1 -0
  147. package/dist/type-extractor/extractor/field-type-resolver.js +433 -0
  148. package/dist/type-extractor/extractor/field-type-resolver.js.map +1 -0
  149. package/dist/type-extractor/extractor/type-extractor.d.ts +12 -3
  150. package/dist/type-extractor/extractor/type-extractor.d.ts.map +1 -1
  151. package/dist/type-extractor/extractor/type-extractor.js +260 -229
  152. package/dist/type-extractor/extractor/type-extractor.js.map +1 -1
  153. package/dist/type-extractor/extractor/type-name-collector.d.ts +24 -0
  154. package/dist/type-extractor/extractor/type-name-collector.d.ts.map +1 -0
  155. package/dist/type-extractor/extractor/type-name-collector.js +102 -0
  156. package/dist/type-extractor/extractor/type-name-collector.js.map +1 -0
  157. package/dist/type-extractor/mapper/scalar-base-type-mapper.d.ts +89 -0
  158. package/dist/type-extractor/mapper/scalar-base-type-mapper.d.ts.map +1 -0
  159. package/dist/type-extractor/mapper/scalar-base-type-mapper.js +158 -0
  160. package/dist/type-extractor/mapper/scalar-base-type-mapper.js.map +1 -0
  161. package/dist/type-extractor/types/diagnostics.d.ts +1 -1
  162. package/dist/type-extractor/types/diagnostics.d.ts.map +1 -1
  163. package/dist/type-extractor/types/graphql.d.ts +2 -0
  164. package/dist/type-extractor/types/graphql.d.ts.map +1 -1
  165. package/dist/type-extractor/types/index.d.ts +2 -1
  166. package/dist/type-extractor/types/index.d.ts.map +1 -1
  167. package/dist/type-extractor/types/index.js +1 -1
  168. package/dist/type-extractor/types/index.js.map +1 -1
  169. package/dist/type-extractor/types/ts-type-reference-factory.d.ts +47 -0
  170. package/dist/type-extractor/types/ts-type-reference-factory.d.ts.map +1 -0
  171. package/dist/type-extractor/types/ts-type-reference-factory.js +75 -0
  172. package/dist/type-extractor/types/ts-type-reference-factory.js.map +1 -0
  173. package/dist/type-extractor/types/typescript.d.ts +25 -1
  174. package/dist/type-extractor/types/typescript.d.ts.map +1 -1
  175. package/dist/type-extractor/validator/type-validator.js +1 -1
  176. package/dist/type-extractor/validator/type-validator.js.map +1 -1
  177. package/docs/coding-agents.md +64 -0
  178. package/docs/configuration.md +6 -20
  179. package/docs/getting-started.md +15 -12
  180. package/docs/index.md +36 -21
  181. package/docs/integration/apollo.md +8 -40
  182. package/docs/integration/drizzle.md +187 -0
  183. package/docs/integration/prisma.md +196 -0
  184. package/docs/integration/yoga.md +8 -40
  185. package/docs/schema/abstract-resolvers.md +117 -0
  186. package/docs/schema/directives.md +5 -0
  187. package/docs/schema/documentation.md +5 -0
  188. package/docs/schema/enums.md +307 -0
  189. package/docs/schema/fields.md +66 -0
  190. package/docs/schema/index.md +21 -0
  191. package/docs/schema/inputs.md +117 -15
  192. package/docs/schema/interfaces.md +31 -1
  193. package/docs/schema/objects.md +42 -0
  194. package/docs/schema/queries-mutations.md +138 -22
  195. package/docs/schema/scalars.md +5 -0
  196. package/docs/schema/unions.md +208 -1
  197. package/docs/what-is-gqlkit.md +13 -8
  198. package/package.json +14 -5
  199. package/src/auto-type-generator/auto-type-generator.ts +1670 -0
  200. package/src/auto-type-generator/index.ts +63 -0
  201. package/src/auto-type-generator/inline-enum-collector.ts +338 -0
  202. package/src/auto-type-generator/inline-object-traverser.ts +49 -0
  203. package/src/auto-type-generator/inline-union-collector.ts +402 -0
  204. package/src/auto-type-generator/inline-union-types.ts +33 -0
  205. package/src/auto-type-generator/inline-union-validator.ts +482 -0
  206. package/src/auto-type-generator/name-collision-validator.ts +119 -0
  207. package/src/auto-type-generator/naming-convention.ts +163 -0
  208. package/src/auto-type-generator/resolve-type-generator.ts +21 -0
  209. package/src/auto-type-generator/resolver-field-iterator.ts +39 -0
  210. package/src/auto-type-generator/typename-extractor.ts +230 -0
  211. package/src/auto-type-generator/typename-resolve-type-generator.ts +281 -0
  212. package/src/auto-type-generator/typename-types.ts +66 -0
  213. package/src/auto-type-generator/typename-validator.ts +326 -0
  214. package/src/cli.ts +13 -0
  215. package/src/commands/docs.ts +211 -0
  216. package/src/commands/gen.ts +141 -0
  217. package/src/commands/main.ts +5 -0
  218. package/src/config/define-config.ts +28 -0
  219. package/src/config/index.ts +7 -0
  220. package/src/config/types.ts +144 -0
  221. package/src/config-loader/index.ts +14 -0
  222. package/src/config-loader/loader.ts +143 -0
  223. package/src/config-loader/validator.ts +672 -0
  224. package/src/gen-orchestrator/hook-executor/hook-executor.ts +117 -0
  225. package/src/gen-orchestrator/orchestrator.ts +798 -0
  226. package/src/gen-orchestrator/reporter/diagnostic-reporter.ts +44 -0
  227. package/src/gen-orchestrator/reporter/progress-reporter.ts +61 -0
  228. package/src/gen-orchestrator/writer/file-writer.ts +38 -0
  229. package/src/index.ts +2 -0
  230. package/src/resolver-extractor/extract-resolvers.ts +82 -0
  231. package/src/resolver-extractor/extractor/define-api-extractor.ts +740 -0
  232. package/src/resolver-extractor/index.ts +13 -0
  233. package/src/resolver-extractor/validator/abstract-resolver-validator.ts +259 -0
  234. package/src/schema-generator/builder/ast-builder.ts +706 -0
  235. package/src/schema-generator/emitter/code-emitter.ts +385 -0
  236. package/src/schema-generator/emitter/sdl-emitter.ts +13 -0
  237. package/src/schema-generator/generate-schema.ts +267 -0
  238. package/src/schema-generator/index.ts +19 -0
  239. package/src/schema-generator/integrator/result-integrator.ts +759 -0
  240. package/src/schema-generator/pruner/schema-pruner.ts +112 -0
  241. package/src/schema-generator/resolver-collector/resolver-collector.ts +157 -0
  242. package/src/shared/constants.ts +122 -0
  243. package/src/shared/default-value-detector.ts +172 -0
  244. package/src/shared/diagnostics.ts +35 -0
  245. package/src/shared/directive-definition-extractor.ts +564 -0
  246. package/src/shared/directive-detector.ts +556 -0
  247. package/src/shared/enum-prefix-detector.ts +99 -0
  248. package/src/shared/file-scanner.ts +170 -0
  249. package/src/shared/ignore-fields-detector.ts +109 -0
  250. package/src/shared/ignore-fields-validator.ts +66 -0
  251. package/src/shared/index.ts +34 -0
  252. package/src/shared/inline-object-extractor.ts +102 -0
  253. package/src/shared/inline-object-utils.ts +23 -0
  254. package/src/shared/interface-detector.ts +176 -0
  255. package/src/shared/interface-validator.ts +211 -0
  256. package/src/shared/metadata-detector.ts +443 -0
  257. package/src/shared/path-utils.ts +3 -0
  258. package/src/shared/program-factory.ts +51 -0
  259. package/src/shared/source-location.ts +38 -0
  260. package/src/shared/tsconfig-loader.ts +126 -0
  261. package/src/shared/tsdoc-parser.ts +155 -0
  262. package/src/shared/type-converter.ts +99 -0
  263. package/src/shared/typescript-utils.ts +246 -0
  264. package/src/type-extractor/collector/result-collector.ts +57 -0
  265. package/src/type-extractor/collector/scalar-collector.ts +254 -0
  266. package/src/type-extractor/converter/field-eligibility.ts +112 -0
  267. package/src/type-extractor/converter/graphql-converter.ts +483 -0
  268. package/src/type-extractor/extract-types.ts +1 -0
  269. package/src/type-extractor/extractor/field-type-resolver.ts +614 -0
  270. package/src/type-extractor/extractor/type-extractor.ts +1644 -0
  271. package/src/type-extractor/extractor/type-name-collector.ts +130 -0
  272. package/src/type-extractor/index.ts +20 -0
  273. package/src/type-extractor/mapper/scalar-base-type-mapper.ts +265 -0
  274. package/src/type-extractor/types/diagnostics.ts +109 -0
  275. package/src/type-extractor/types/graphql.ts +55 -0
  276. package/src/type-extractor/types/index.ts +37 -0
  277. package/src/type-extractor/types/ts-type-reference-factory.ts +150 -0
  278. package/src/type-extractor/types/typescript.ts +137 -0
  279. package/src/type-extractor/validator/type-validator.ts +77 -0
  280. package/dist/auto-type-generator/auto-type-generator.test.d.ts +0 -2
  281. package/dist/auto-type-generator/auto-type-generator.test.d.ts.map +0 -1
  282. package/dist/auto-type-generator/auto-type-generator.test.js +0 -613
  283. package/dist/auto-type-generator/auto-type-generator.test.js.map +0 -1
  284. package/dist/auto-type-generator/name-collision-validator.test.d.ts +0 -2
  285. package/dist/auto-type-generator/name-collision-validator.test.d.ts.map +0 -1
  286. package/dist/auto-type-generator/name-collision-validator.test.js +0 -358
  287. package/dist/auto-type-generator/name-collision-validator.test.js.map +0 -1
  288. package/dist/auto-type-generator/naming-convention.test.d.ts +0 -2
  289. package/dist/auto-type-generator/naming-convention.test.d.ts.map +0 -1
  290. package/dist/auto-type-generator/naming-convention.test.js +0 -132
  291. package/dist/auto-type-generator/naming-convention.test.js.map +0 -1
  292. package/dist/commands/gen.test.d.ts +0 -2
  293. package/dist/commands/gen.test.d.ts.map +0 -1
  294. package/dist/commands/gen.test.js +0 -226
  295. package/dist/commands/gen.test.js.map +0 -1
  296. package/dist/config-loader/loader.test.d.ts +0 -2
  297. package/dist/config-loader/loader.test.d.ts.map +0 -1
  298. package/dist/config-loader/loader.test.js +0 -123
  299. package/dist/config-loader/loader.test.js.map +0 -1
  300. package/dist/config-loader/validator.test.d.ts +0 -2
  301. package/dist/config-loader/validator.test.d.ts.map +0 -1
  302. package/dist/config-loader/validator.test.js +0 -846
  303. package/dist/config-loader/validator.test.js.map +0 -1
  304. package/dist/gen-orchestrator/golden.test.d.ts +0 -2
  305. package/dist/gen-orchestrator/golden.test.d.ts.map +0 -1
  306. package/dist/gen-orchestrator/golden.test.js +0 -102
  307. package/dist/gen-orchestrator/golden.test.js.map +0 -1
  308. package/dist/gen-orchestrator/hook-executor/hook-executor.test.d.ts +0 -2
  309. package/dist/gen-orchestrator/hook-executor/hook-executor.test.d.ts.map +0 -1
  310. package/dist/gen-orchestrator/hook-executor/hook-executor.test.js +0 -167
  311. package/dist/gen-orchestrator/hook-executor/hook-executor.test.js.map +0 -1
  312. package/dist/gen-orchestrator/reporter/progress-reporter.test.d.ts +0 -2
  313. package/dist/gen-orchestrator/reporter/progress-reporter.test.d.ts.map +0 -1
  314. package/dist/gen-orchestrator/reporter/progress-reporter.test.js +0 -74
  315. package/dist/gen-orchestrator/reporter/progress-reporter.test.js.map +0 -1
  316. package/dist/resolver-extractor/validator/only-validator.d.ts +0 -61
  317. package/dist/resolver-extractor/validator/only-validator.d.ts.map +0 -1
  318. package/dist/resolver-extractor/validator/only-validator.js +0 -76
  319. package/dist/resolver-extractor/validator/only-validator.js.map +0 -1
  320. package/dist/resolver-extractor/validator/only-validator.test.d.ts +0 -8
  321. package/dist/resolver-extractor/validator/only-validator.test.d.ts.map +0 -1
  322. package/dist/resolver-extractor/validator/only-validator.test.js +0 -352
  323. package/dist/resolver-extractor/validator/only-validator.test.js.map +0 -1
  324. package/dist/schema-generator/builder/ast-builder.test.d.ts +0 -2
  325. package/dist/schema-generator/builder/ast-builder.test.d.ts.map +0 -1
  326. package/dist/schema-generator/builder/ast-builder.test.js +0 -469
  327. package/dist/schema-generator/builder/ast-builder.test.js.map +0 -1
  328. package/dist/shared/file-scanner.test.d.ts +0 -2
  329. package/dist/shared/file-scanner.test.d.ts.map +0 -1
  330. package/dist/shared/file-scanner.test.js +0 -138
  331. package/dist/shared/file-scanner.test.js.map +0 -1
  332. package/dist/shared/interface-validator.test.d.ts +0 -2
  333. package/dist/shared/interface-validator.test.d.ts.map +0 -1
  334. package/dist/shared/interface-validator.test.js +0 -145
  335. package/dist/shared/interface-validator.test.js.map +0 -1
  336. package/dist/type-extractor/types/typescript.test.d.ts +0 -2
  337. package/dist/type-extractor/types/typescript.test.d.ts.map +0 -1
  338. package/dist/type-extractor/types/typescript.test.js +0 -287
  339. package/dist/type-extractor/types/typescript.test.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  export type { DeprecationInfo } from "../../shared/tsdoc-parser.js";
2
2
  export type { Diagnostic, DiagnosticCode, Diagnostics, SourceLocation, } from "./diagnostics.js";
3
3
  export type { EnumValueInfo, FieldInfo, GraphQLFieldType, GraphQLTypeInfo, GraphQLTypeKind, } from "./graphql.js";
4
- export type { EnumMemberInfo, ExtractedTypeInfo, FieldDefinition, InlineObjectMember, InlineObjectProperty, InlineObjectPropertyDef, ScalarTypeInfo, TSTypeReference, TSTypeReferenceKind, TypeKind, TypeMetadata, } from "./typescript.js";
4
+ export { createArrayType, createInlineObjectType, createLiteralType, createPrimitiveType, createReferenceType, createScalarType, createUnionType, } from "./ts-type-reference-factory.js";
5
+ export type { EnumMemberInfo, ExtractedTypeInfo, FieldDefinition, InlineEnumMemberInfo, InlineObjectMember, InlineObjectProperty, InlineObjectPropertyDef, ScalarTypeInfo, TSTypeReference, TSTypeReferenceKind, TypeKind, TypeMetadata, } from "./typescript.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/type-extractor/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,YAAY,GACb,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/type-extractor/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,YAAY,GACb,MAAM,iBAAiB,CAAC"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export { createArrayType, createInlineObjectType, createLiteralType, createPrimitiveType, createReferenceType, createScalarType, createUnionType, } from "./ts-type-reference-factory.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/type-extractor/types/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/type-extractor/types/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type ts from "typescript";
2
+ import type { DeprecationInfo } from "../../shared/tsdoc-parser.js";
3
+ import type { InlineEnumMemberInfo, InlineObjectPropertyDef, ScalarTypeInfo, TSTypeReference } from "./typescript.js";
4
+ interface CreateReferenceTypeParams {
5
+ readonly name: string;
6
+ readonly nullable: boolean;
7
+ }
8
+ export declare function createReferenceType(params: CreateReferenceTypeParams): TSTypeReference;
9
+ interface CreatePrimitiveTypeParams {
10
+ readonly name: string;
11
+ readonly nullable: boolean;
12
+ }
13
+ export declare function createPrimitiveType(params: CreatePrimitiveTypeParams): TSTypeReference;
14
+ export declare function createArrayType(elementType: TSTypeReference): TSTypeReference;
15
+ interface CreateUnionTypeParams {
16
+ readonly members: ReadonlyArray<TSTypeReference>;
17
+ readonly nullable: boolean;
18
+ }
19
+ export declare function createUnionType(params: CreateUnionTypeParams): TSTypeReference;
20
+ interface CreateInlineObjectTypeParams {
21
+ readonly properties: ReadonlyArray<InlineObjectPropertyDef>;
22
+ /** TSDoc description from the type alias (null for true inline objects) */
23
+ readonly description: string | null;
24
+ /** @deprecated tag from the type alias (null for true inline objects) */
25
+ readonly deprecated: DeprecationInfo | null;
26
+ }
27
+ export declare function createInlineObjectType(params: CreateInlineObjectTypeParams): TSTypeReference;
28
+ interface CreateScalarTypeParams {
29
+ readonly name: string;
30
+ readonly scalarInfo: ScalarTypeInfo;
31
+ readonly nullable: boolean;
32
+ }
33
+ export declare function createScalarType(params: CreateScalarTypeParams): TSTypeReference;
34
+ export declare function createLiteralType(name: string): TSTypeReference;
35
+ interface CreateInlineEnumTypeParams {
36
+ readonly members: ReadonlyArray<InlineEnumMemberInfo>;
37
+ readonly nullable: boolean;
38
+ /** External TypeScript enum symbol for deduplication (null for string literal unions) */
39
+ readonly externalEnumSymbol: ts.Symbol | null;
40
+ /** TSDoc description from the external enum type itself (null for string literal unions) */
41
+ readonly externalEnumDescription: string | null;
42
+ /** @deprecated tag from the external enum type itself (null for string literal unions) */
43
+ readonly externalEnumDeprecated: DeprecationInfo | null;
44
+ }
45
+ export declare function createInlineEnumType(params: CreateInlineEnumTypeParams): TSTypeReference;
46
+ export {};
47
+ //# sourceMappingURL=ts-type-reference-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts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Q,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,GAC7B,eAAe,CASjB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAE/D;AAED,UAAU,0BAA0B;IAClC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC;IAC9C,4FAA4F;IAC5F,QAAQ,CAAC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,0FAA0F;IAC1F,QAAQ,CAAC,sBAAsB,EAAE,eAAe,GAAG,IAAI,CAAC;CACzD;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,0BAA0B,GACjC,eAAe,CAWjB"}
@@ -0,0 +1,75 @@
1
+ function createTSTypeReference(params) {
2
+ return {
3
+ kind: params.kind,
4
+ name: null,
5
+ elementType: null,
6
+ members: null,
7
+ nullable: false,
8
+ scalarInfo: null,
9
+ inlineObjectProperties: null,
10
+ inlineObjectDescription: null,
11
+ inlineObjectDeprecated: null,
12
+ inlineEnumMembers: null,
13
+ externalEnumSymbol: null,
14
+ externalEnumDescription: null,
15
+ externalEnumDeprecated: null,
16
+ ...params.overrides,
17
+ };
18
+ }
19
+ export function createReferenceType(params) {
20
+ return createTSTypeReference({
21
+ kind: "reference",
22
+ overrides: { name: params.name, nullable: params.nullable },
23
+ });
24
+ }
25
+ export function createPrimitiveType(params) {
26
+ return createTSTypeReference({
27
+ kind: "primitive",
28
+ overrides: { name: params.name, nullable: params.nullable },
29
+ });
30
+ }
31
+ export function createArrayType(elementType) {
32
+ return createTSTypeReference({ kind: "array", overrides: { elementType } });
33
+ }
34
+ export function createUnionType(params) {
35
+ return createTSTypeReference({
36
+ kind: "union",
37
+ overrides: { members: params.members, nullable: params.nullable },
38
+ });
39
+ }
40
+ export function createInlineObjectType(params) {
41
+ return createTSTypeReference({
42
+ kind: "inlineObject",
43
+ overrides: {
44
+ inlineObjectProperties: params.properties,
45
+ inlineObjectDescription: params.description,
46
+ inlineObjectDeprecated: params.deprecated,
47
+ },
48
+ });
49
+ }
50
+ export function createScalarType(params) {
51
+ return createTSTypeReference({
52
+ kind: "scalar",
53
+ overrides: {
54
+ name: params.name,
55
+ scalarInfo: params.scalarInfo,
56
+ nullable: params.nullable,
57
+ },
58
+ });
59
+ }
60
+ export function createLiteralType(name) {
61
+ return createTSTypeReference({ kind: "literal", overrides: { name } });
62
+ }
63
+ export function createInlineEnumType(params) {
64
+ return createTSTypeReference({
65
+ kind: "inlineEnum",
66
+ overrides: {
67
+ inlineEnumMembers: params.members,
68
+ nullable: params.nullable,
69
+ externalEnumSymbol: params.externalEnumSymbol,
70
+ externalEnumDescription: params.externalEnumDescription,
71
+ externalEnumDeprecated: params.externalEnumDeprecated,
72
+ },
73
+ });
74
+ }
75
+ //# sourceMappingURL=ts-type-reference-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-type-reference-factory.js","sourceRoot":"","sources":["../../../src/type-extractor/types/ts-type-reference-factory.ts"],"names":[],"mappings":"AAcA,SAAS,qBAAqB,CAC5B,MAAmC;IAEnC,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,IAAI;QAChB,sBAAsB,EAAE,IAAI;QAC5B,uBAAuB,EAAE,IAAI;QAC7B,sBAAsB,EAAE,IAAI;QAC5B,iBAAiB,EAAE,IAAI;QACvB,kBAAkB,EAAE,IAAI;Q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,OAAO,qBAAqB,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,qBAAqB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAaD,MAAM,UAAU,oBAAoB,CAClC,MAAkC;IAElC,OAAO,qBAAqB,CAAC;QAC3B,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACT,iBAAiB,EAAE,MAAM,CAAC,OAAO;YACjC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;YAC7C,uBAAuB,EAAE,MAAM,CAAC,uBAAuB;YACvD,sBAAsB,EAAE,MAAM,CAAC,sBAAsB;SACtD;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type ts from "typescript";
1
2
  import type { DirectiveArgumentValue, DirectiveInfo } from "../../shared/directive-detector.js";
2
3
  import type { DeprecationInfo } from "../../shared/tsdoc-parser.js";
3
4
  import type { SourceLocation } from "./diagnostics.js";
@@ -27,7 +28,18 @@ export interface TypeMetadata {
27
28
  readonly deprecated: DeprecationInfo | null;
28
29
  readonly directives: ReadonlyArray<DirectiveInfo> | null;
29
30
  }
30
- export type TSTypeReferenceKind = "primitive" | "reference" | "array" | "union" | "literal" | "scalar" | "inlineObject";
31
+ export type TSTypeReferenceKind = "primitive" | "reference" | "array" | "union" | "literal" | "scalar" | "inlineObject" | "inlineEnum";
32
+ /**
33
+ * Information about an inline enum member (string literal union value).
34
+ */
35
+ export interface InlineEnumMemberInfo {
36
+ /** Original value from TypeScript (e.g., "pendingReview") */
37
+ readonly value: string;
38
+ /** Description from TSDoc (if available) */
39
+ readonly description: string | null;
40
+ /** Deprecation info from @deprecated tag */
41
+ readonly deprecated: DeprecationInfo | null;
42
+ }
31
43
  export interface TSTypeReference {
32
44
  readonly kind: TSTypeReferenceKind;
33
45
  readonly name: string | null;
@@ -36,6 +48,18 @@ export interface TSTypeReference {
36
48
  readonly nullable: boolean;
37
49
  readonly scalarInfo: ScalarTypeInfo | null;
38
50
  readonly inlineObjectProperties: ReadonlyArray<InlineObjectPropertyDef> | null;
51
+ /** TSDoc description from the inline object type alias (Requirement 7.2) */
52
+ readonly inlineObjectDescription: string | null;
53
+ /** @deprecated tag from the inline object type alias (Requirement 7.3) */
54
+ readonly inlineObjectDeprecated: DeprecationInfo | null;
55
+ /** Inline enum members when kind is "inlineEnum" */
56
+ readonly inlineEnumMembers: ReadonlyArray<InlineEnumMemberInfo> | null;
57
+ /** External TypeScript enum symbol for deduplication (Requirement 5.2) */
58
+ readonly externalEnumSymbol: ts.Symbol | null;
59
+ /** TSDoc description from the external enum type itself (Requirement 6.1) */
60
+ readonly externalEnumDescription: string | null;
61
+ /** @deprecated tag from the external enum type itself (Requirement 6.3) */
62
+ readonly externalEnumDeprecated: DeprecationInfo | null;
39
63
  }
40
64
  export interface InlineObjectPropertyDef {
41
65
  readonly name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/type-extractor/types/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,WAAW,GACX,OAAO,GACP,MAAM,GACN,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC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,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACpD,QAAQ,CAAC,mBAAmB,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;IACvE,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC9D"}
@@ -1,5 +1,5 @@
1
1
  import { BUILT_IN_SCALARS } from "../../shared/constants.js";
2
- const PLACEHOLDER_TYPES = new Set(["__INLINE_OBJECT__"]);
2
+ const PLACEHOLDER_TYPES = new Set(["__INLINE_OBJECT__", "__INLINE_ENUM__"]);
3
3
  function isOptionsObject(arg) {
4
4
  return !Array.isArray(arg) && "types" in arg;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"type-validator.js","sourceRoot":"","sources":["../../../src/type-extractor/validator/type-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAY7D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAEzD,SAAS,eAAe,CACtB,GAA0D;IAE1D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,GAAG,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,cAAqE;IAErE,MAAM,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AC;YACH,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/C,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACvC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxD,WAAW,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,sBAAsB;wBAC5B,OAAO,EAAE,UAAU,IAAI,CAAC,IAAI,iCAAiC,MAAM,GAAG;wBACtE,QAAQ,EAAE,OAAO;wBACjB,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;qBACxD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,WAAW,CAAC,MAAM,KAAK,CAAC;QAC/B,WAAW;KACZ,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"type-validator.js","sourceRoot":"","sources":["../../../src/type-extractor/validator/type-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAY7D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAE5E,SAAS,eAAe,CACtB,GAA0D;IAE1D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,GAAG,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,cAAqE;IAErE,MAAM,KAAK,GAAG,eAAe,CAAC,cAAc,CAAC;QAC3C,CAAC,CAAC,cAAc,CAAC,KAAK;QACtB,CAAC,CAAC,cAAc,CAAC;IACnB,MAAM,iBAAiB,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AM,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACvC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxD,WAAW,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,sBAAsB;wBAC5B,OAAO,EAAE,UAAU,IAAI,CAAC,IAAI,iCAAiC,MAAM,GAAG;wBACtE,QAAQ,EAAE,OAAO;wBACjB,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;qBACxD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,WAAW,CAAC,MAAM,KAAK,CAAC;QAC/B,WAAW;KACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,64 @@
1
+ ---
2
+ title: Coding Agents
3
+ description: Set up AI coding agents like Claude Code and Codex to understand gqlkit conventions. (skip if reading via `gqlkit-guide` skill)
4
+ ---
5
+
6
+ # Coding Agents
7
+
8
+ gqlkit provides built-in support for AI coding agents like [Claude Code](https://claude.ai/code) and [OpenAI Codex](https://openai.com/index/openai-codex/). The `gqlkit docs` command generates skill files that help these tools understand gqlkit conventions and provide better assistance.
9
+
10
+ ## Setup
11
+
12
+ Run the following command in your project root:
13
+
14
+ ```sh filename="npm"
15
+ npm exec gqlkit docs
16
+ ```
17
+
18
+ ```sh filename="pnpm"
19
+ pnpm gqlkit docs
20
+ ```
21
+
22
+ ```sh filename="yarn"
23
+ yarn gqlkit docs
24
+ ```
25
+
26
+ The command auto-detects your environment based on existing files (`CLAUDE.md`, `.claude/`, `AGENTS.md`, `.codex/`) and generates the appropriate files.
27
+
28
+ ## Generated Files
29
+
30
+ ### Claude Code
31
+
32
+ When Claude Code environment is detected (or `--claude` flag is used):
33
+
34
+ - `.claude/skills/gqlkit-guide/SKILL.md` - Skill definition with gqlkit documentation
35
+ - `.claude/skills/gqlkit-guide/references/` - Symlink to detailed documentation
36
+ - `CLAUDE.md` - Updated with gqlkit section (created if not exists)
37
+
38
+ ### OpenAI Codex
39
+
40
+ When Codex environment is detected (or `--codex` flag is used):
41
+
42
+ - `.codex/skills/gqlkit-guide/SKILL.md` - Skill definition with gqlkit documentation
43
+ - `.codex/skills/gqlkit-guide/references/` - Symlink to detailed documentation
44
+ - `AGENTS.md` - Updated with gqlkit section (created if not exists)
45
+
46
+ ## Options
47
+
48
+ | Option | Description |
49
+ |--------|-------------|
50
+ | `--output <dir>` | Output directory (default: current directory) |
51
+ | `--claude` | Generate Claude Code files explicitly |
52
+ | `--codex` | Generate Codex files explicitly |
53
+
54
+ ## How It Works
55
+
56
+ The generated skill files follow the [Agent Skills](https://agentskills.io/) specification. When you ask the coding agent about gqlkit, it will:
57
+
58
+ 1. Recognize gqlkit-related questions from the skill description
59
+ 2. Read the bundled documentation to understand gqlkit conventions
60
+ 3. Provide accurate guidance based on the latest documentation
61
+
62
+ ## Keeping Skills Updated
63
+
64
+ Re-run `gqlkit docs` after updating gqlkit to ensure the skill files reflect the latest documentation.
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Configuration
3
+ description: Configure gqlkit via gqlkit.config.ts in your project root.
4
+ ---
5
+
1
6
  # Configuration
2
7
 
3
8
  gqlkit can be configured via `gqlkit.config.ts` in your project root.
@@ -49,7 +54,7 @@ export default defineConfig({
49
54
 
50
55
  ## Custom Scalar Types
51
56
 
52
- Map TypeScript types to GraphQL custom scalars via config:
57
+ Map TypeScript types to GraphQL custom scalars via config. See [Scalars](./schema/scalars) for complete documentation including the `GqlScalar` approach.
53
58
 
54
59
  ```ts
55
60
  export default defineConfig({
@@ -59,29 +64,10 @@ export default defineConfig({
59
64
  tsType: { from: "./src/gqlkit/schema/scalars", name: "DateTime" },
60
65
  description: "ISO 8601 datetime string",
61
66
  },
62
- {
63
- name: "UUID",
64
- tsType: { name: "string" },
65
- only: "input", // Input-only scalar
66
- },
67
67
  ],
68
68
  });
69
69
  ```
70
70
 
71
- ### Scalar Options
72
-
73
- | Option | Type | Description |
74
- |--------|------|-------------|
75
- | `name` | `string` | The GraphQL scalar name |
76
- | `tsType.name` | `string` | The TypeScript type name |
77
- | `tsType.from` | `string` (optional) | Import path for the type (omit for global types) |
78
- | `description` | `string` (optional) | Description for the GraphQL schema |
79
- | `only` | `"input"` \| `"output"` (optional) | Restrict scalar to input or output positions |
80
-
81
- > [!TIP]
82
- >
83
- > You can also define custom scalars using the `GqlScalar` utility type directly in your schema files. See [Scalars](/schema/scalars) for more details.
84
-
85
71
  ## Output Paths
86
72
 
87
73
  Customize output file locations or disable specific outputs:
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Getting Started
3
+ description: Install gqlkit and create your first GraphQL schema from TypeScript.
4
+ ---
5
+
1
6
  # Getting Started
2
7
 
3
8
  ## Installation
@@ -17,6 +22,10 @@ yarn add @gqlkit-ts/runtime @graphql-tools/schema graphql
17
22
  yarn add -D @gqlkit-ts/cli
18
23
  ```
19
24
 
25
+ > [!TIP]
26
+ >
27
+ > If you use AI coding agents like Claude Code or Codex, run `gqlkit docs` to set up gqlkit skills. See [Coding Agents](./coding-agents) for details.
28
+
20
29
  ## Project Structure
21
30
 
22
31
  gqlkit expects your types and resolvers to be in `src/gqlkit/schema/`:
@@ -52,27 +61,21 @@ export const { defineQuery, defineMutation, defineField } =
52
61
  createGqlkitApis<Context>();
53
62
  ```
54
63
 
55
- ## Define Your First Type
64
+ ## Define Your First Type and Query
56
65
 
57
- Create a simple User type in `src/gqlkit/schema/user.ts`:
66
+ Create a simple User type and query in `src/gqlkit/schema/user.ts`:
58
67
 
59
68
  ```typescript
69
+ import { defineQuery } from "../gqlkit";
70
+ import type { NoArgs } from "@gqlkit-ts/runtime";
71
+
60
72
  export type User = {
61
73
  id: string;
62
74
  name: string;
63
75
  email: string | null;
64
76
  };
65
- ```
66
-
67
- ## Define a Query
68
-
69
- Create a query resolver in `src/gqlkit/schema/query.ts`:
70
-
71
- ```typescript
72
- import { defineQuery } from "../gqlkit";
73
- import type { NoArgs } from "@gqlkit-ts/runtime";
74
- import type { User } from "./user";
75
77
 
78
+ // NoArgs indicates this query takes no arguments
76
79
  export const me = defineQuery<NoArgs, User | null>(
77
80
  (_root, _args, ctx) => ctx.currentUser
78
81
  );
package/docs/index.md CHANGED
@@ -1,32 +1,47 @@
1
1
  # gqlkit
2
2
 
3
- > gqlkit is a convention-driven code generator for GraphQL servers in TypeScript. Define GraphQL types and resolver signatures in TypeScript, then `gqlkit gen` generates GraphQL schema AST and a resolver map from your codebase.
3
+ gqlkit generates GraphQL schema and resolver maps from TypeScript types and functions.
4
+
5
+ ## How it works
6
+
7
+ 1. Write TypeScript types in `src/gqlkit/schema/` → become GraphQL types
8
+ 2. Write resolver functions using `defineQuery`, `defineMutation`, `defineField` → become GraphQL resolvers
9
+ 3. Run `gqlkit gen` → outputs `typeDefs` and `resolvers` to `src/gqlkit/__generated__/`
10
+
11
+ ## Design principles
12
+
13
+ - **Implement first**: Write types and resolvers, generate schema when ready. No edit-regenerate-implement loops.
14
+ - **Just types and functions**: Plain TypeScript with a thin API. No decorators, no complex generics.
15
+ - **Type-safe**: TypeScript types become GraphQL types. Resolver signatures checked at compile time.
4
16
 
5
17
  ## Documentation
6
18
 
7
- - [What is gqlkit?](./what-is-gqlkit.md): gqlkit is a convention-driven code generator for GraphQL servers in TypeScript.
8
- - [Getting Started](./getting-started.md): gqlkit expects your types and resolvers to be in `src/gqlkit/schema/`:
19
+ - [What is gqlkit?](./what-is-gqlkit.md): Just types and functions write TypeScript, generate GraphQL.
20
+ - [Getting Started](./getting-started.md): Install gqlkit and create your first GraphQL schema from TypeScript.
21
+ - [Coding Agents](./coding-agents.md): Set up AI coding agents like Claude Code and Codex to understand gqlkit conventions. (skip if reading via `gqlkit-guide` skill)
9
22
 
10
- ## Schema Definition
23
+ ## CLI
11
24
 
12
- - [Schema Definition](./schema.md): gqlkit generates GraphQL schema from your TypeScript types. All exported types from `src/gqlkit/schema/` are automatically scanned and converted to GraphQL types.
13
- - [Object Types](./schema/objects.md): Plain TypeScript type exports become GraphQL Object types.
14
- - [Input Types](./schema/inputs.md): TypeScript types with `Input` suffix are treated as GraphQL input types.
15
- - [Queries & Mutations](./schema/queries-mutations.md): Define Query and Mutation fields using the `@gqlkit-ts/runtime` API.
16
- - [Field Resolvers](./schema/fields.md): Add computed fields to object types using `defineField`. Define them alongside the type.
17
- - [Scalar Types](./schema/scalars.md): gqlkit provides built-in scalar types and supports custom scalar definitions.
18
- - [Enum Types](./schema/enums.md): gqlkit converts TypeScript string literal unions and enums to GraphQL enum types.
19
- - [Union Types](./schema/unions.md): TypeScript union types of object types are converted to GraphQL union types.
20
- - [Interface Types](./schema/interfaces.md): Define GraphQL interface types using the `GqlInterface` utility type.
21
- - [Abstract Type Resolution](./schema/abstract-resolvers.md): GraphQL abstract types (unions and interfaces) require runtime type resolution to determine the concrete type of returned values. gqlkit provides `defineResolveType` and `defineIsTypeOf` to handle this.
22
- - [Documentation](./schema/documentation.md): gqlkit extracts TSDoc/JSDoc comments and converts them to GraphQL descriptions.
23
- - [Custom Directives](./schema/directives.md): Define custom directives using the `GqlDirective` utility type and attach them using `GqlField` or `GqlObject`.
25
+ - [Configuration](./configuration.md): Configure gqlkit via gqlkit.config.ts in your project root.
24
26
 
25
- ## Integration
27
+ ## Schema Definition
26
28
 
27
- - [graphql-yoga](./integration/yoga.md): [graphql-yoga](https://the-guild.dev/graphql/yoga-server) is a batteries-included GraphQL server that works in any JavaScript runtime.
28
- - [Apollo Server](./integration/apollo.md): [Apollo Server](https://www.apollographql.com/docs/apollo-server/) is a popular GraphQL server with extensive features and ecosystem.
29
+ - [Schema Definition](./schema.md): gqlkit generates GraphQL schema from your TypeScript types.
30
+ - [Defining Object Types](./schema/objects.md): Plain TypeScript type exports become GraphQL Object types.
31
+ - [Defining Input Types](./schema/inputs.md): TypeScript types with Input suffix are treated as GraphQL input types.
32
+ - [Defining Queries and Mutations](./schema/queries-mutations.md): Define Query and Mutation fields using the @gqlkit-ts/runtime API.
33
+ - [Defining Field Resolvers](./schema/fields.md): Add computed fields to object types using defineField.
34
+ - [Defining Scalar Types](./schema/scalars.md): gqlkit provides built-in scalar types and supports custom scalar definitions.
35
+ - [Defining Enum Types](./schema/enums.md): gqlkit converts TypeScript string literal unions and enums to GraphQL enum types.
36
+ - [Defining Union Types](./schema/unions.md): TypeScript union types of object types are converted to GraphQL union types.
37
+ - [Defining Interface Types](./schema/interfaces.md): Define GraphQL interface types using the GqlInterface utility type.
38
+ - [Resolving Abstract Types](./schema/abstract-resolvers.md): Handle runtime type resolution for GraphQL unions and interfaces.
39
+ - [Adding Documentation to Schema](./schema/documentation.md): gqlkit extracts TSDoc/JSDoc comments and converts them to GraphQL descriptions.
40
+ - [Defining Custom Directives](./schema/directives.md): Define custom directives using the GqlDirective utility type.
29
41
 
30
- ## Guides
42
+ ## Integration
31
43
 
32
- - [Configuration](./configuration.md): gqlkit can be configured via `gqlkit.config.ts` in your project root.
44
+ - [Integration with graphql-yoga](./integration/yoga.md): Use gqlkit with graphql-yoga, a batteries-included GraphQL server.
45
+ - [Integration with Apollo Server](./integration/apollo.md): Use gqlkit with Apollo Server, a popular GraphQL server.
46
+ - [Integration with Drizzle ORM](./integration/drizzle.md): Derive GraphQL types from Drizzle table definitions.
47
+ - [Integration with Prisma](./integration/prisma.md): Derive GraphQL types from Prisma model types.
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Integration with Apollo Server
3
+ description: Use gqlkit with Apollo Server, a popular GraphQL server.
4
+ ---
5
+
1
6
  # Apollo Server
2
7
 
3
8
  [Apollo Server](https://www.apollographql.com/docs/apollo-server/) is a popular GraphQL server with extensive features and ecosystem.
@@ -16,18 +21,9 @@ pnpm add @apollo/server
16
21
  yarn add @apollo/server
17
22
  ```
18
23
 
19
- ## Creating the Schema
20
-
21
- First, create an executable schema using `makeExecutableSchema`:
22
-
23
- ```typescript
24
- // src/schema.ts
25
- import { makeExecutableSchema } from "@graphql-tools/schema";
26
- import { typeDefs } from "./gqlkit/__generated__/schema";
27
- import { resolvers } from "./gqlkit/__generated__/resolvers";
24
+ ## Prerequisites
28
25
 
29
- export const schema = makeExecutableSchema({ typeDefs, resolvers });
30
- ```
26
+ Create an executable schema following the [Getting Started guide](../getting-started.md#create-graphql-schema).
31
27
 
32
28
  ## Basic Server
33
29
 
@@ -50,35 +46,7 @@ console.log(`Server is running on ${url}`);
50
46
 
51
47
  ## With Context
52
48
 
53
- If your resolvers use a context type, provide a context factory:
54
-
55
- ```typescript
56
- // src/gqlkit/context.ts
57
- export type Context = {
58
- currentUser: User | null;
59
- db: Database;
60
- };
61
- ```
62
-
63
- ```typescript
64
- // src/gqlkit/gqlkit.ts
65
- import { createGqlkitApis } from "@gqlkit-ts/runtime";
66
- import type { Context } from "./context";
67
-
68
- export const { defineQuery, defineMutation, defineField } =
69
- createGqlkitApis<Context>();
70
- ```
71
-
72
- ```typescript
73
- // src/gqlkit/schema/query.ts
74
- import { defineQuery } from "../gqlkit";
75
- import type { NoArgs } from "@gqlkit-ts/runtime";
76
- import type { User } from "./user";
77
-
78
- export const me = defineQuery<NoArgs, User | null>(
79
- (_root, _args, ctx) => ctx.currentUser
80
- );
81
- ```
49
+ If your resolvers use a context type, first [set up context and resolver factories](../getting-started.md#set-up-context-and-resolver-factories), then provide a context factory to your server:
82
50
 
83
51
  ```typescript
84
52
  // src/server.ts