confluentinc / ksqldb-graphql

Node.js GraphQL integration for ksqlDB
https://ksqldb.io/
Other
57 stars 15 forks source link

Publish transpiled npm packages #8

Closed dferber90 closed 2 years ago

dferber90 commented 4 years ago

At the moment the @confluentinc/ksqldb-graphql and @confluentinc/ksqldb-client packages are pushed to npm as TypeScript. This makes it very hard to use the packages. Basically, the only solution is to add TypeScript to the project, and to then set it to transpile the module from node_modules.

The reasons it works in the rideshare demo are that the packages are used through yarn workspaces locally, and that rideshare itself is written in TypeScript.

Instead, I would expect the npm package to contain the JavaScript version, while it could still export the TypeScript types.

This seems like a good article explaining how to do it: https://medium.com/cameron-nokes/the-30-second-guide-to-publishing-a-typescript-package-to-npm-89d93ff7bccd

jrea commented 4 years ago

thanks for bringing this up.

I will look into in when I get a chance and get this fixed.

gklijs commented 3 years ago

Also ran into this. Took quite some time to find out this was the problem, as I'm not that experienced with Node. I now hacked a bit around to get it working locally. Any plans to pick this up? I might want to try to fix it with a pr, I think it should be easily solvable. Trying to get https://github.com/gklijs/ksqlDB-GraphQL-poc to work.

dferber90 commented 2 years ago

I'm cleaning up my old issues, so feel free to reopen if this is still relevant.

I've stopped using ksqldb since, so I'm unsure if it's still a problem.

gklijs commented 2 years ago

It's still an issue, but since it's now clearly marked as PoC it's fine. Not sure about Confluent plans, and if anything is being done to use GraphQL with ksqlDB.