Hi!
First of all, thank you for your work developing this type generator! It makes it possible to catch errors across a large codebase much easier, especially in CI/CD workflows.
The documentation mentions some examples where you can 'cast' the provided variables to the desired type. This is reflected upstream in the typescript definitions. In my experienced with a rust based type-generator, I found it is possible within UPDATE, CREATE and other statements, to infer the type at compile time.
For example if I did UPDATE $user SET email = $email, it can infer the required type of email as a string, because the field email is defined as a string in the schema.
This would reduce a lot of boilerplate while maintaining the same if not a higher safety margin on static typing.
Let me know your thoughts, and thanks again for your work on this project.
Hi!
First of all, thank you for your work developing this type generator! It makes it possible to catch errors across a large codebase much easier, especially in CI/CD workflows.
The documentation mentions some examples where you can 'cast' the provided variables to the desired type. This is reflected upstream in the typescript definitions. In my experienced with a rust based type-generator, I found it is possible within
UPDATE,CREATEand other statements, to infer the type at compile time.For example if I did
UPDATE $user SET email = $email, it can infer the required type of email as a string, because the field email is defined as a string in the schema.This would reduce a lot of boilerplate while maintaining the same if not a higher safety margin on static typing.
Let me know your thoughts, and thanks again for your work on this project.