Skip to content

Multiple instances of UTC_NOW in a transaction should resolve to the same value #4231

@ChrisBQu

Description

@ChrisBQu

Consider running the following:

defradb client schema add '
  type User {
    name: String 
    created: DateTime @default(dateTime: UTC_NOW) 
  }
'

defradb client query '
mutation {
    bob: create_User(input: { name: "Bob" }) {
        _docID
        name
        created
    }

    alice: create_User(input: { name: "Alice" }) {
        _docID
        name
        created
    }
}
'

Currently, we expect the created timestamp on both documents to be slightly different from one another, as instances of UTC_NOW are resolved separately for each mutation. This is not the desired behavior. All instances of it should resolved to exactly the same value.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions