Relational queries result types are not working

Hi,

When i call findMany or findFirst with no args, the result type is
const trips: {
    [x: string]: unknown;
}[]


When i include with arg, the result type do not provide the relational type

query
  const trips = await db.query.tripModel.findMany({
      with: {
        riderModel: true,
      },
    });


result type
const trips: {
    id: number;
    companyId: number;
    createdAt: Date;
    lineId: number;
    carNumber: number;
    passengerCount: number;
    kilometerTraveled: number;
    averageSpeed: number;
    finishedAt: Date;
}[]
image.png
image.png
Was this page helpful?