All files / src/modules/search/dto search-response.dto.ts

100% Statements 11/11
100% Branches 0/0
100% Functions 3/3
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  11x 11x     11x 33x 11x   33x 11x   33x 11x    
// src/modules/search/dto/search-response.dto.ts
import { Field, ObjectType } from '@nestjs/graphql';
import { Listing } from '@app/modules/listings/listing.model';
 
@ObjectType()
export class SearchResponseDto {
  @Field(() => [Listing])
  results!: Listing[];
 
  @Field(() => String, { nullable: true })
  facets?: string; // JSON stringified
 
  @Field(() => [String], { nullable: true })
  searchAfter?: string[]; // JSON stringified array
}