Skip to content
Snippets Groups Projects
raw-result.model.ts 514 B
Newer Older
Steve Reis's avatar
Steve Reis committed
import { Field, ObjectType } from '@nestjs/graphql';
import GraphQLJSON from 'graphql-type-json';
Steve Reis's avatar
Steve Reis committed
import { Result } from './common/result.model';

// field name 'rawdata' was used instead of 'data' because of typing problem on union with same field name
// see :https://stackoverflow.com/questions/44170603/graphql-using-same-field-names-in-different-types-within-union

Steve Reis's avatar
Steve Reis committed
@ObjectType()
export class RawResult extends Result {
  @Field(() => GraphQLJSON, { nullable: true, defaultValue: '' })
  rawdata?: unknown;
Steve Reis's avatar
Steve Reis committed
}