Closed elektrica closed 2 years ago
Hi @elektrica
I tested it with a giant project a few days ago and I realized that: inside the inputs
file, the typescript starts to suffer from some complexities
But when the type is imported for use within resolvers, the type safety works correctly. Was it like that in your case?
I believe there is a problem with recursive type inference with Pothos. And I believe that in this regard, this library can't do much :/
That's true, the issues seems to be isolated to the inputs file, which is good. Really appreciate you looking at it. You may be right that this is likely just a very strange Pothos problem.
For some reason, the schema below results in a generated
inputs.ts
file that does not type check. I tried to simplify it down to the smallest possible case, but there seems to be something about this schema in particular that causes it to fail. If I remove any part of it then it goes back to working correctly.