phil
12/11/2017, 8:17 AMcreatedAt
and updatedAt
default fields? Is there a different directive than @model
that has those (with corresponding date creation/update behaviors)?alexanbj
12/11/2017, 9:08 AMalexanbj
12/11/2017, 9:09 AMphil
12/12/2017, 6:47 PMphil
12/12/2017, 6:47 PMtype Tweet @model {
id: ID! @isUnique
createdAt: DateTime!
updatedAt: DateTime!
text: String!
owner: User! @relation(name: "UserOnTweet")
}
phil
12/12/2017, 6:48 PMOptional system fields: createdAt and updatedAt
Graphcool offers two special fields that you can add to @model types:
- createdAt: DateTime!: Stores the exact date and time for when a node of this model type was created.
- updatedAt: DateTime!: Stores the exact date and time for when a node of this model type was last updated.
phil
12/12/2017, 6:48 PM