in Order class we have a UUID and other fields:
export class Order extends BaseEntity {
@Field()
@PrimaryGeneratedColumn("uuid")
id: string;
// other fields ...
}
the resolver could be sth like this:
@Query(() => Order)
async getNextOrder(
@Arg("data")
{ orderId }: GetNextOrderInput,
) {
return await Order.findOne(id:MoreThan(orderId);
}
I know that it`s not working, So how to achieve the next item? is UUID time based and can be used as an index?