-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem? Please describe.
I am just playing around with the GraphQL/AppSync bit of Amplify.
When creating objects, I want to be able to have a timestamp automatically added for it.
After peaking in build/resolvers/Mutation.createMODELNAME.request
I found out that luckily updatedAt
and createdAt
are added automatically.
I feel like this could/should be added/noted in the docs.
Describe the solution you'd like
Maybe something like:
Timestamps
Amplify supports automatic timestamps for your models. To use them, add them to your schema as such:
type MyModel @model { createdAt: String updatedAt: String # ... other attributes }Amplify will populate these accordingly.
Describe alternatives you've considered
I don't really think taking a look at the build code and finding it yourself is a viable alternative.
Additional context
%
Looking forward to hear your thoughts on this.