function mapToService () {
  return ({ request, requestMapper, mappings }) => {
    const data = mapData(request.data, request, mappings)
    return {
      ...request,
      data: applyEndpointMapper(data, request, requestMapper)
    }
  }
}
function mapToService () {
  return ({ request, requestMapper, mappings }) => {
    const data = mapData(request.data, request, mappings)
    return {
      ...request,
      data: applyEndpointMapper(data, request, requestMapper)
    }
  }
}
function mapToService ( ) { return ( { request , requestMapper , mappings } ) => { const data = mapData ( request . data , request , mappings ) return { ... request , data : applyEndpointMapper ( data , request , requestMapper ) } } }
Map the data coming _from_ the service. Everything is handled by the mappings,
but this method make sure that the right types are mapped.

@param {Object} data - The data to map
@param {Object} mappings - The mappings to map with
@returns {Object} Mapped data
Map the data coming _from_ the service . Everything is handled by the mappings but this method make sure that the right types are mapped .