Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find type metadata for input type or object type named '' #755

Closed
xinghul opened this issue Dec 2, 2020 · 2 comments
Closed
Labels
Question ❔ Not future request, proposal or bug issue Solved ✔️ The issue has been solved

Comments

@xinghul
Copy link

xinghul commented Dec 2, 2020

Describe the Bug
Everything works great if I'm running the code with ts-node, however, if I try to compile the code to javascript, and will hit the error for any FieldResolver.

I guess this is somewhat related to #55, and my question is, should we compile a typescript project containing type-graphql down to javascript? Because that's what I normally do in the production environment for better performance.

I tried to set up babel with @babel/preset-typescript, babel-plugin-transform-typescript-metadata and @babel/plugin-proposal-decorators, still no lock.

Thank you!

@MichalLytek
Copy link
Owner

should we compile a typescript project containing type-graphql down to javascript? Because that's what I normally do in the production environment for better performance.

You can compile using tsc, you don't need to use babel if you don't know how to configure that 😉

@MichalLytek MichalLytek added the Question ❔ Not future request, proposal or bug issue label Dec 2, 2020
@xinghul
Copy link
Author

xinghul commented Dec 2, 2020

yes tsc works, I was using babel because I have some alias set up, and tsc does not handle that microsoft/TypeScript#10866

Anyway, I went back to use module-alias with tsc.

Closing this now as it's resolved. Thank you!

@xinghul xinghul closed this as completed Dec 2, 2020
@MichalLytek MichalLytek added the Solved ✔️ The issue has been solved label Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question ❔ Not future request, proposal or bug issue Solved ✔️ The issue has been solved
Projects
None yet
Development

No branches or pull requests

2 participants