public SimpleFieldValidation addRule ( ExecutionPath fieldPath , BiFunction < FieldAndArguments , FieldValidationEnvironment , Optional < GraphQLError > > rule ) { rules . put ( fieldPath , rule ) ; return this ; }
Adds the rule against the field address path . If the rule returns an error it will be added to the list of errors