Skip to content

Commit

Permalink
fix: fix that withModuleSelection() dropped all fields after it dropp…
Browse files Browse the repository at this point in the history
…ed one
  • Loading branch information
Yogu committed Aug 6, 2024
1 parent 08631db commit 8efee14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions spec/project/select-modules-in-sources.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('selectModulesInProjectSource', () => {
two: String @modules(in: "module2")
extra1: String @modules(in: ["extra1", "module2 && extra2"])
extra2: String @modules(in: ["extra2"])
one: String @modules(in: "module1")
}
type Two @rootEntity @modules(in: ["module2", "module3"]) {
Expand All @@ -35,6 +36,7 @@ describe('selectModulesInProjectSource', () => {
two: String @modules(in: ["module2"])
extra1: String @modules(in: ["extra1"])
one: String @modules(in: "module1")
}
type Two @rootEntity @modules(in: ["module2"]) {
Expand Down
2 changes: 1 addition & 1 deletion src/project/select-modules-in-sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function selectModulesInGraphQLSource({
}
// remove field
changes.push({ location: fieldDef.loc });
break;
continue;
}

const moduleChange = changeModuleDirectiveIfNecessary(fieldDef, {
Expand Down

0 comments on commit 8efee14

Please sign in to comment.