|
1 | 1 | package com.kobylynskyi.graphql.codegen.model; |
2 | 2 |
|
3 | | -import com.kobylynskyi.graphql.codegen.generators.FreeMarkerTemplateType; |
4 | | - |
5 | 3 | import java.io.File; |
6 | 4 | import java.util.HashMap; |
7 | 5 | import java.util.HashSet; |
@@ -64,6 +62,7 @@ public class MappingConfig implements GraphQLCodegenConfiguration, Combinable<Ma |
64 | 62 | // field resolvers configs: |
65 | 63 | private Set<String> fieldsWithResolvers = new HashSet<>(); |
66 | 64 | private Set<String> fieldsWithoutResolvers = new HashSet<>(); |
| 65 | + private Set<String> fieldsToExcludeFromGeneration = new HashSet<>(); |
67 | 66 |
|
68 | 67 | // parent interfaces configs: |
69 | 68 | private String queryResolverParentInterface; |
@@ -191,6 +190,7 @@ public void combine(MappingConfig source) { |
191 | 190 | GraphQLCodegenConfiguration::getParametrizedInputSuffix); |
192 | 191 | fieldsWithResolvers = combineSet(fieldsWithResolvers, source.fieldsWithResolvers); |
193 | 192 | fieldsWithoutResolvers = combineSet(fieldsWithoutResolvers, source.fieldsWithoutResolvers); |
| 193 | + fieldsToExcludeFromGeneration = combineSet(fieldsToExcludeFromGeneration, source.fieldsToExcludeFromGeneration); |
194 | 194 | customTypesMapping = combineMap(customTypesMapping, source.customTypesMapping); |
195 | 195 | customTemplates = combineMap(customTemplates, source.customTemplates); |
196 | 196 | customAnnotationsMapping = combineMap(customAnnotationsMapping, source.customAnnotationsMapping); |
@@ -589,6 +589,15 @@ public void setFieldsWithoutResolvers(Set<String> fieldsWithoutResolvers) { |
589 | 589 | this.fieldsWithoutResolvers = fieldsWithoutResolvers; |
590 | 590 | } |
591 | 591 |
|
| 592 | + @Override |
| 593 | + public Set<String> getFieldsToExcludeFromGeneration() { |
| 594 | + return fieldsToExcludeFromGeneration; |
| 595 | + } |
| 596 | + |
| 597 | + public void setFieldsToExcludeFromGeneration(Set<String> fieldsToExcludeFromGeneration) { |
| 598 | + this.fieldsToExcludeFromGeneration = fieldsToExcludeFromGeneration; |
| 599 | + } |
| 600 | + |
592 | 601 | @Override |
593 | 602 | public String getQueryResolverParentInterface() { |
594 | 603 | return queryResolverParentInterface; |
|
0 commit comments