Closed austinbiggs closed 6 months ago
@austinbiggs is the generated mock file missing ALL types import statements or only input types are missing?
@austinbiggs is the generated mock file missing ALL types import statements or only input types are missing?
@ardeois There are no imports in the file at all. It appears that *Payload
and *Input
types are the missing imports.
Resolved! 🎉
The issue was that I accidentally have an extra s
in the TypesFile
config key (typesFiles
.)
Thinking out loud, a potential improvement that could benefit users would be logging unused/unrecognized config keys to the console. This would've helped me surface my user error sooner. 😸
Before I dive in, thank you for creating this library. There have been a few times that I've really wanted a solution as elegant as this plugin (and I've nearly attempted it myself.) 😸
I'm experiencing an issue with the file generation when linking to an existing (generated) types file, the generated mock data file is missing an import statement. This results in broken types imports in the generated file.
A few thoughts I've had while debugging:
An example code generator config (using
*.codegen.ts
rather than.yml
:The output from running the code generator: