Related object is not typed correctly
I have the following schema
And I am querying like this
cat is of type
I was expecting it to be typed correctly
7 Replies
you need to pass your schema into
drizzle()
as the second argument
@Kairu I am already doing that, everything is exported from the same place so I know it's not missing
you need to define the reverse relation side, otherwise, there is no way to know which columns define this relation
@Dan Kochetov do I always have to define both sides of the relation? What if I only ever want to query from one side?
not always, but in this case you didn't specify the columns
Can I just specify the fields in the many relation?
I'm just gonna write some helper functions to automatically generate it, I hope I can make it type safe though
you need to define the columns on the relation side that actually has those columns
the
many
side doesn't have columns that define the relation