I'm trying to give a type to the members of below function.
args
is an object with a data
property of type UserCreateInput
So, from this:
createUser(parent: any, args: any, context: any) {
return context.prisma.createUser(args.data)
}
I wrote this:
createUser(parent: any, args: {data: UserCreateInput}, context: any) {
return context.prisma.createUser(args.data)
}
I'm not sure how to replace 'xxx' in createUser(parent: any, xxx, context: any)
so I can simply return return context.prisma.createUser(data)