What happened to the `createdAt` and `updatedAt` d...
# prisma-whats-new
p
What happened to the
createdAt
and
updatedAt
default fields? Is there a different directive than
@model
that has those (with corresponding date creation/update behaviors)?
a
just add them yourself. Graphcool will set the values correctly for you
p
Oh interesting.
Copy code
type Tweet @model {  
  id: ID! @isUnique
  createdAt: DateTime!
  updatedAt: DateTime!
  text: String!
  owner: User! @relation(name: "UserOnTweet")
}
Copy code
Optional 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.
Thanks @alexanbj