use of graphql.schema.idl.errors.DirectiveIllegalReferenceError in project graphql-java by graphql-java.
the class SchemaTypeDirectivesChecker method commonCheck.
private void commonCheck(Collection<DirectiveDefinition> directiveDefinitions, List<GraphQLError> errors) {
directiveDefinitions.forEach(directiveDefinition -> {
assertTypeName(directiveDefinition, errors);
directiveDefinition.getInputValueDefinitions().forEach(inputValueDefinition -> {
assertTypeName(inputValueDefinition, errors);
assertExistAndIsInputType(inputValueDefinition, errors);
if (inputValueDefinition.hasDirective(directiveDefinition.getName())) {
errors.add(new DirectiveIllegalReferenceError(directiveDefinition, inputValueDefinition));
}
});
});
}
Aggregations