use of graphql.schema.idl.errors.TypeExtensionEnumValueRedefinitionError in project graphql-java by graphql-java.
the class SchemaTypeExtensionsChecker method checkForEnumValueRedefinition.
private void checkForEnumValueRedefinition(List<GraphQLError> errors, TypeDefinition typeDefinition, List<EnumValueDefinition> enumValueDefinitions, List<EnumValueDefinition> referenceEnumValueDefinitions) {
Map<String, EnumValueDefinition> referenceMap = FpKit.getByName(referenceEnumValueDefinitions, EnumValueDefinition::getName, mergeFirst());
enumValueDefinitions.forEach(fld -> {
if (referenceMap.containsKey(fld.getName())) {
errors.add(new TypeExtensionEnumValueRedefinitionError(typeDefinition, fld));
}
});
}
Aggregations