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

Add TypeScript definitions #124

Closed
marcpascualsanchez opened this issue May 4, 2022 · 2 comments
Closed

Add TypeScript definitions #124

marcpascualsanchez opened this issue May 4, 2022 · 2 comments

Comments

@marcpascualsanchez
Copy link

Hello @tot-ra 👋
As mentioned in another issue we are planning to add new features. Exploring the code we realised that some types are missing. We plan to gradually add typing while developing new features.

We have notticed the GraphQL schema is manually specified. We have used a GraphQL + TypeScript library (typegraphql) for other projects that works well. Do you think it's OK to refactor the project using it? This change may affect a significant part of the project.

Thank you so much! 😄

@tot-ra
Copy link
Owner

tot-ra commented May 4, 2022

hey. I didn't use it myself & looking at typescript decorators feature it reminds me of doctrine or java.

I personally dislike this style of meta-programming because

  • it takes away control from the regular iterative style & adds more declarative style instead
  • it adds much noise @annotations to class & method definitions, that I'm loosing focus of the actual logic

On the other hand, I was sceptical of typescript too initially 🤷🏻‍♂️ . I'd suggest to add some minor PR into this repo to see how it looks like & how much issues does it solve. WDYT?

@marcpascualsanchez
Copy link
Author

I understand the cons of using decorators but I still think the pros of faster development and GraphQL schemas from source code are good enough to consider it. Still, it's not a big deal.

Talking about typescript, we can add it to a part of the project and show it in a PR as you said 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants