You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current GraphQLObjectMapper outputs JSON response using the following codes in convertSanitizedExecutionResult() .:
if (areErrorsPresent(executionResult)) {
result.put("errors", executionResult.getErrors());
}
It causes that if GraphQLError is ExceptionWhileDataFetching and if it contains a Throwable internally , all of that Stacktrace will be dump out in the response. Is it a good idea to always ensure that GraphQLError is serialised to JSON according to the specification by using the method GraphQLError#toSpecification() such that I don't need to customize GraphQLObjectMapper or GraphQLErrorHandler ?
if (areErrorsPresent(executionResult)) {
result.put("errors", executionResult.getErrors().stream().map(err->err.toSpecification()).collect(toList()));
}
The text was updated successfully, but these errors were encountered:
Current
GraphQLObjectMapper
outputs JSON response using the following codes inconvertSanitizedExecutionResult()
.:It causes that if
GraphQLError
isExceptionWhileDataFetching
and if it contains aThrowable
internally , all of that Stacktrace will be dump out in the response. Is it a good idea to always ensure thatGraphQLError
is serialised to JSON according to the specification by using the methodGraphQLError#toSpecification()
such that I don't need to customizeGraphQLObjectMapper
orGraphQLErrorHandler
?The text was updated successfully, but these errors were encountered: