Keep Optional query results when ResponseTypes.optionalInstanceOf goes away

Proprietary

Axon Framework 5 has no ResponseTypes, and query(q, ResponseTypes.optionalInstanceOf(R.class)) becomes query(q, R.class), whose future no longer holds an Optional. This changes the call to query(q, ResponseTypes.instanceOf(R.class)).thenApply(Optional::ofNullable), so the code that uses the result still gets an Optional.

io.moderne.axon.OptionalQueryResult
mod run . --recipe=io.moderne.axon.OptionalQueryResult

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.