Kanel cannot resolve types that are exported by extensions
Closed this issue · 5 comments
Hi @kristiandupont , is there a reason why extension types are explicitly ignored ?
I'm using the ISN extension that exposes types for book identification and I think Kanel is issuing a "Could not resolve type public.isbn referenced in table" warning due to this limitation
Well, it felt to me like what people would most likely want, especially if an extension creates a lot of stuff. But I guess you could argue that it should be optional..
I see, for the time being, I ended up defining custom maps, like so:
{
'public.isbn13': 'string',
'public.isbn': 'string'
}
Nevertheless, it would be great if this was an opt-in / opt-out feature (either via a boolean or even whitelists), especially because custom maps might hide sophistication needed to produce better zod schemas (for example)
That's a fair point. Are you using kanel-zod? I am myself but I am not aware of anyone using it for something real, and I am curious to hear if it works for people..
I am :) It's really nice and has a robust API, so far so good but I've been using it for one day. There was very little I had to actually customize
Great! It works for my use cases obviously but it's hard to decide exactly how customizable it should be and what it should derive from the database. But let me know if anything bothers you :-)