- Notifications
You must be signed in to change notification settings - Fork 112
Closed
Milestone
Description
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())); }Metadata
Metadata
Assignees
Labels
No labels