Closed larsivi closed 1 year ago
Hi @larsivi Its seems like a error at config pothos builder types.
Can you please share a minimal reproducible example?
Sorry about this (again), learning to fully exhaust the problem solving opportunities. Setting up the minimal example, I noticed the same issue, but tacked on to the bottom there was also a note on objects.d.ts not compiling. This didn't show up in my project, but when I tried to compile my objects.d.ts I saw that it didn't compile either. This was a generation config error, so when fixing that, everything did in fact compile :)
I think I have the basics in place now (a schema, generated pothos and autocrud). However, compiling the project cause errors as seen at the bottom. The reason seems to be that the type of resolve doesn't match the actual output from the prisma API. I think I perhaps can fix this via the replacer functionality, but it also seems that this should come out correct from the initial generate phase.
I have the following config:
`src/generated/crud/Customer/mutations/deleteOne.base.ts:10:7 - error TS2322: Type 'Promise' is not assignable to type 'MaybePromise<readonly unknown[]> | null | undefined'.
Type 'Promise' is not assignable to type 'Promise<readonly unknown[]>'.
Type 'Customer' is not assignable to type 'readonly unknown[]'.
10 await _context.db.customer.delete({ where: args.where, ...query }),
`