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

Use in Typescript #13

Closed
NoahTheDuke opened this issue Jul 22, 2021 · 1 comment
Closed

Use in Typescript #13

NoahTheDuke opened this issue Jul 22, 2021 · 1 comment

Comments

@NoahTheDuke
Copy link

Hey friends!

I currently use graphql-api-koa version 2.0.2 because it was the latest version when this project was started in 2019. I've been looking at updating to the latest graphql version which requires updating to the latest version of this package, but that is blocked because our project is 100% Typescript and graphql-api-koa is 100% .mjs, which Typescript currently can't use.

Do you have any suggestions or recommendations for using this project without copying the whole thing into my project and changing the filetypes from .mjs to .ts?

@jaydenseric
Copy link
Owner

Standard ESM with .mjs is a 100% valid, vanilla way to publish a Node.js package on npm. Soon the majority of maintained packages on npm will be pure ESM, with many using .mjs. I'll close this issue because it's really about TypeScript bugs that are already tracked in issues in their repo. It's on Microsoft (a multibillion dollar corporation) to support their users and provide workarounds to their bugs when they choose to delay fixes.

If you have to choose between up-to-date dependencies, or TypeScript, the obvious choice is updated dependencies. Otherwise you're accepting bloated node_modules and an app riddled with bugs or even security issues to make a dev tool happy.

See: sindresorhus/meta#15 (reply in thread)

Even though this issue is closed, feel free to continue the discussion and share TypeScript workarounds; you should be able to get it going. I'm quite sure there are TypeScript users on the latest version of graphql-api-koa.

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