public async Task <IEnumerable <PropertyResponse> > Handle(GetAllPropertiesQuery request, CancellationToken cancellationToken) { var filter = _mapper.Map <GetAllPropertiesFilter>(request.PropertiesRequestQueryString); var properties = await _propertiesService.GetAllPropertiesAsync(filter); return(_mapper.Map <IEnumerable <PropertyResponse> >(properties)); }
public PropertiesQuery( IPropertiesService propertiesService) { FieldAsync <ListGraphType <PropertyType> >( "Properties", resolve: async context => await propertiesService.GetAllPropertiesAsync()); }