Closed dferber90 closed 2 years ago
thanks for bringing this up.
I will look into in when I get a chance and get this fixed.
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.
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.
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.
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 fromnode_modules
.The reasons it works in the
rideshare
demo are that the packages are used through yarn workspaces locally, and thatrideshare
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