import type { Constructor } from '@wener/utils'; import { Field, InputType, ObjectType } from 'type-graphql'; export function createDataType(Type: Constructor) { return function withDataType(Base: TBase) { @InputType() @ObjectType() class HasDataMixinType extends Base { @Field(() => Type) data!: T; } return HasDataMixinType; }; }