public void addError ( GraphQLError error , ExecutionPath fieldPath ) { // // see http://facebook.github.io/graphql/#sec-Errors-and-Non-Nullability about how per // field errors should be handled - ie only once per field if its already there for nullability // but unclear if its not that error path // for ( GraphQLError graphQLError : errors ) { List < Object > path = graphQLError . getPath ( ) ; if ( path != null ) { if ( fieldPath . equals ( ExecutionPath . fromList ( path ) ) ) { return ; } } } this . errors . add ( error ) ; }
This method will only put one error per field path .