filipstefansson / nexus-validate

🔑 Add argument validation to your GraphQL Nexus API.
35 stars 8 forks source link

TS type error #14

Closed reaink closed 3 years ago

reaink commented 3 years ago
Type '({ string }: { string: any; }) => { email: any; }' has no properties in common with type 'ArgsValidationConfig<{ data: { name?: string; password?: string; }; }>'.ts(2559)

in code

args: {
    email: stringArg(),
},
validate: ({ string }) => ({
  email: string().email(),
}),

my ts version 4.4.3 nexus-validate 1.1.0

reaink commented 3 years ago

Found the problem, must return a type