From 8efee14911dce62b4519617552b3211116738189 Mon Sep 17 00:00:00 2001 From: Jan Melcher Date: Tue, 6 Aug 2024 11:37:47 +0200 Subject: [PATCH] fix: fix that withModuleSelection() dropped all fields after it dropped one --- spec/project/select-modules-in-sources.spec.ts | 2 ++ src/project/select-modules-in-sources.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/project/select-modules-in-sources.spec.ts b/spec/project/select-modules-in-sources.spec.ts index 7211a5e8..b180e605 100644 --- a/spec/project/select-modules-in-sources.spec.ts +++ b/spec/project/select-modules-in-sources.spec.ts @@ -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"]) { @@ -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"]) { diff --git a/src/project/select-modules-in-sources.ts b/src/project/select-modules-in-sources.ts index 55993b90..4b842f17 100644 --- a/src/project/select-modules-in-sources.ts +++ b/src/project/select-modules-in-sources.ts @@ -240,7 +240,7 @@ function selectModulesInGraphQLSource({ } // remove field changes.push({ location: fieldDef.loc }); - break; + continue; } const moduleChange = changeModuleDirectiveIfNecessary(fieldDef, {