JS-1597 support GraphQL near-operation-file outputs#7133
Conversation
Ruling Report✅ No changes to ruling expected issues in this PR |
|
Code Review ✅ Approved 1 resolved / 1 findingsImplements precise detection for GraphQL near-operation-file outputs and fixes early execution of getAnalyzableFilesConfigKey. Refined resolution logic ensures generated files are correctly identified without recursive directory tagging. ✅ 1 resolved✅ Performance: getAnalyzableFilesConfigKey computed eagerly before cheap checks
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |



What
near-operation-fileoutputs can be handled preciselynear-operation-filedirectory outputs as generated companion matches instead of recursively tagging the whole directoryWhy
The new GraphQL follow-up needs to distinguish generated companion files from handwritten sibling files. While adding that support, the AST helper for optional config properties could throw on a missing property, which caused GraphQL output parsing to fall back to an empty result.
Validation
npx tsx --tsconfig packages/tsconfig.test.json --test packages/analysis/tests/common/file-kinds.test.ts packages/analysis/tests/jsts/project-metadata/generated-sources.test.ts packages/analysis/tests/dependency-manifests.test.ts packages/analysis/tests/generate-eslint-meta-source.test.ts packages/analysis/tests/jsts/linter/filter-generated-source.test.ts packages/analysis/tests/source-files.test.ts packages/analysis/tests/file-stores.test.ts packages/analysis/tests/common/configuration.test.tsnpx tsc -p packages/tsconfig.json --noEmit --pretty falsenpx prettier --check packages/analysis/src/jsts/rules/helpers/generated-sources/detectors/graphql-codegen.ts packages/analysis/tests/jsts/project-metadata/generated-sources.test.tsgit diff --checkSummary by Gitar
graphql-codegen.tsto strictly require task invocations forcodegen.config.*files.packageDirinstead of the configuration file location.watchOnlyGraphqlDirectoryOutputto resolve paths consistently from the package root.codegen.*variants to the watch list and fallback detection logic.This will update automatically on new commits.