fix: order history entries

This commit is contained in:
Vyacheslav Matyukhin 2022-04-29 22:09:19 +04:00
parent da7415bf65
commit 822225b781
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C

View File

@ -113,7 +113,13 @@ export const QuestionObj = builder.prismaObject("Question", {
resolve: (parent) => (parent.extra as any)?.visualization, // used for guesstimate only, see searchGuesstimate.ts resolve: (parent) => (parent.extra as any)?.visualization, // used for guesstimate only, see searchGuesstimate.ts
nullable: true, nullable: true,
}), }),
history: t.relation("history", {}), history: t.relation("history", {
query: () => ({
orderBy: {
timestamp: "asc",
},
}),
}),
}), }),
}); });