Hi, I had a problem on using ArgsType() with an array of inputs.
my ArgsType looks like this
@ObjectType()
class UserInfo{
@Field()
username: string;
@Field()
email: string
}
@ArgsType()
export class DriverArgs {
@Field()
collection: string;
@Field(type=>[UserInfo])
userInfo: UserInfo[];
}
but it is failing with the following error Cannot determine GraphQL input type for IUserInfo.
Kindly need your help.
Thanks
@itsgracian since you're using UserInfo in Input, you should add @InputType() decorator on it.
In addition to @ObjectType()
Hey @GrayStrider, thank you so much.