@@ -38,8 +38,10 @@ public class Codegen extends AbstractMojo {
3838 @ Parameter (defaultValue = "${project}" )
3939 private MavenProject project ;
4040
41- @ Parameter (property = "schemas" , defaultValue = "${project.basedir}/src/main/resources/schema" )
42- private File [] schemas ;
41+ @ Parameter (
42+ property = "schemaPaths" ,
43+ defaultValue = "${project.basedir}/src/main/resources/schema" )
44+ private File [] schemaPaths ;
4345
4446 @ Parameter (alias = "schemaJarFilesFromDependencies" , property = "schemaJarFilesFromDependencies" )
4547 private String [] schemaJarFilesFromDependencies ;
@@ -161,6 +163,9 @@ public class Codegen extends AbstractMojo {
161163 @ Parameter (property = "addDeprecatedAnnotation" , defaultValue = "false" )
162164 private boolean addDeprecatedAnnotation ;
163165
166+ @ Parameter (property = "trackInputFieldSet" , defaultValue = "false" )
167+ private boolean trackInputFieldSet ;
168+
164169 @ Parameter (property = "dgs.codegen.skip" , defaultValue = "false" , required = false )
165170 private boolean skip ;
166171
@@ -192,7 +197,7 @@ public class Codegen extends AbstractMojo {
192197 */
193198 private Set <File > expandSchemaPaths () {
194199 if (onlyGenerateChanged ) {
195- Set <File > configuredSchemaPaths = stream (schemas ).collect (toSet ());
200+ Set <File > configuredSchemaPaths = stream (schemaPaths ).collect (toSet ());
196201 Set <File > expandedSchemaPaths = new HashSet <>();
197202
198203 // expand any directories into graphql file paths
@@ -207,7 +212,7 @@ private Set<File> expandSchemaPaths() {
207212 getLog ().info (String .format ("expanded schema paths: %s" , expandedSchemaPaths ));
208213 return expandedSchemaPaths ;
209214 } else {
210- return stream (schemas ).collect (toSet ());
215+ return stream (schemaPaths ).collect (toSet ());
211216 }
212217 }
213218
@@ -302,7 +307,8 @@ public void execute() {
302307 implementSerializable ,
303308 addGeneratedAnnotation ,
304309 disableDatesInGeneratedAnnotation ,
305- addDeprecatedAnnotation );
310+ addDeprecatedAnnotation ,
311+ trackInputFieldSet );
306312
307313 getLog ().info (format ("Codegen config: \n %s" , config ));
308314
0 commit comments