Make waspc/todoApp return tasks in consistent order (#632)

(cherry picked from commit 57606c74e4)
This commit is contained in:
Filip Sodić 2022-06-16 14:50:02 +02:00 committed by GitHub
parent f83b9cd152
commit 5e5b264448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,10 @@ export const getTasks = async (args, context) => {
const Task = context.entities.Task
const tasks = await Task.findMany(
{ where: { user: { id: context.user.id } } }
{
where: { user: { id: context.user.id } },
orderBy: { id: 'asc' },
}
)
return tasks
}