Describe the bug
When a mutation argument type contains a scalar property the generated code fails to compile. The scalar is wrapped with either a FixFixture<> or Maybe<> with the error message "Cannot find name ''"
To Reproduce
Create a schema that contains a mutation with with null or non-null argument scalar property (see below)
Generates the following code for the argument.
@TypeGraphQL.ArgsType()
export class MutationRemoveUserArgs {
Describe the bug When a mutation argument type contains a scalar property the generated code fails to compile. The scalar is wrapped with either a FixFixture<> or Maybe<> with the error message "Cannot find name ''"
To Reproduce
@TypeGraphQL.ArgsType() export class MutationRemoveUserArgs {
@TypeGraphQL.Field(type => CustomID) id!: FixDecorator;
};
Error message: "Cannot find name 'CustomID"
codegen.yml
config file:Expected behavior
Expecting the argument class to be:
@TypeGraphQL.ArgsType() export class MutationRemoveUserArgs {
@TypeGraphQL.Field(type => String) id!: FixDecorator<Scalars['CustomID']>; };
Environment:
@graphql-codegen/...
: "@graphql-codegen/cli": "^1.21.3", "@graphql-codegen/typescript-type-graphql": "^1.18.3"