I need to put current timestamp in mutation query when user cancels the order. It should be on server-side (cause it's not ok to rely on client's data).
Here is a simple mutation in my Laravel Lighthouse GraphQL schema:
type Mutation {
cancelOrder(id: ID!, canceled_at: DateTime = "2021-02-19 12:00:00"): Order @update
}
How to change this hardcoded timestamp with some sort of now() function result? Like this:
cancelOrder(id: ID!, canceled_at: DateTime = current_timestamp): Order @update