Avoiding cypher injects when using parameter maps

I have a use case where I'm generating a dynamic query before eventually calling session.query(...) with it. I'm providing a parameter map to the function that has input that comes from the user. I figured this input would get automatically sanitized but it does not and I can't find anything in documentation that talks about sanitizing inputs for the parameter map.

I'm aware that there's a JDBC PreparedStatement class that will do such a thing...but that seems like a pretty weird solution. Does OGM provide a way to sanitize parameter maps passed to Neo4jSession.query?

I'd suggest using your Spring Hibernate/Jackson implementation along with model views (DTOs) to perform the necessary validation. If you then want to get it into map form to pass to cypher, the way I've done this is to define a map method on each DTO to get the map form of the sanitized data.