The deprecated onException method in DataFetcherExceptionHandler has had a default implementation since version GraphQL Java 18, and is being removed altogether in "2023 July". It looks like we still have an implementation of it in ExceptionResolversExceptionHandler that throws UnsupportedOperationException.