Is there an existing issue for this?
Product
Hot Chocolate
Describe the bug
When configuring an inheritance model using an Annotation-based strategy, Analyzers does not correctly generate the IRequestExecutorBuilder extension.
Steps to reproduce
Configuring the following
[ InterfaceType ]
public abstract class StatementTransaction
{
public int Id { get ; set ; }
public DateTime StatementDate { get ; set ; }
public StatementTransactionStatus Status { get ; set ; }
public StatementTransactionType Type { get ; set ; }
}
public sealed class DepositStatementTransaction : StatementTransaction
{
public decimal CollectionAmount { get ; init ; }
}
public sealed class BillingStatementTransaction : StatementTransaction
{
public decimal FeeAndChargeAmount { get ; init ; }
}
Result:
public static class FeeDepositReportTypesRequestExecutorBuilderExtensions
{
public static IRequestExecutorBuilder AddFeeDepositReportTypes ( this IRequestExecutorBuilder builder )
{
builder . AddDataLoader < FeeDepositReport . PatientBatchDataLoader > ( ) ;
builder . AddDataLoader < FeeDepositReport . PracticeLocationBatchDataLoader > ( ) ;
builder . AddType < FeeDepositReport . StatementTransaction > ( ) ;
builder . AddTypeExtension < FeeDepositReport . FeeDepositReportQuery > ( ) ;
return builder ;
}
}
Exception:
1. There is no object type implementing interface `StatementTransaction`. (HotChocolate.Types.InterfaceType<FeeDepositReport.StatementTransaction>)
Expected Result
public static class FeeDepositReportTypesRequestExecutorBuilderExtensions
{
public static IRequestExecutorBuilder AddFeeDepositReportTypes ( this IRequestExecutorBuilder builder )
{
builder . AddDataLoader < FeeDepositReport . PatientBatchDataLoader > ( ) ;
builder . AddDataLoader < FeeDepositReport . PracticeLocationBatchDataLoader > ( ) ;
builder . AddType < FeeDepositReport . DepositStatementTransaction > ( ) ;
builder . AddType < FeeDepositReport . BillingStatementTransaction > ( ) ;
builder . AddTypeExtension < FeeDepositReport . FeeDepositReportQuery > ( ) ;
return builder ;
}
}
Relevant log output
1. There is no object type implementing interface ` StatementTransaction` . (HotChocolate.Types.InterfaceType< FeeDepositReport.StatementTransaction> )
Additional Context?
No response
Version
12.21.0
Reactions are currently unavailable
Is there an existing issue for this?
Product
Hot Chocolate
Describe the bug
When configuring an inheritance model using an Annotation-based strategy, Analyzers does not correctly generate the IRequestExecutorBuilder extension.
Steps to reproduce
Configuring the following
Result:
Exception:
Expected Result
Relevant log output
Additional Context?
No response
Version
12.21.0