Open FezVrasta opened 3 months ago
As far as I know, you will have to use either implements
or something like mapped-types
' OmitType
for this.
Thanks, I tried OmitType but the resulting schema ends up missing all the Product properties and only includes prices
.
@ObjectType()
export class ProductNode extends OmitType(Product, ["prices"] as const) {
@Field(() => ProductPriceConnection)
prices!: ProductPriceConnection;
}
Hi, thanks for the library!
I have an auto generated ObjectType like the following:
I would like to make
prices
a connection, but if I do the following TypeScript complains withProperty 'prices' in type 'ProductNode' is not assignable to the same property in base type 'Product'.
I also get the same error when I define the ResolverInterface.
Is there a canonical way to address this class of issues or the only way is to use
implements
rather thanextends
and re-define the whole object type manually?Thanks.