Enabling Conflict Resolution Doesn't Populate _version, _lastChangedAt (Datastore Migration) #14018
Open
3 tasks done
Labels
pending-maintainer-response
Issue is pending a response from the Amplify team.
pending-triage
Issue is pending triage
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
GraphQL API, DataStore
Amplify Version
v6
Amplify Categories
api
Backend
Amplify CLI
Environment information
Describe the bug
Upon enabling conflict resolution in an already-populated database, the DataStore client cannot connect to the databse because "_version" and "_lastChangedAt" are not populated. If you try to add those fields manually and default them to something, it gives you errors such as:
type CreateEventInput has already a field with name _version
while the datastore client gives errors such as:
`Cannot return null for non-nullable type: 'Int' (/syncEvents/items[23]/_version)
Expected behavior
Upon enabling conflict resolution, the fields for _version and _lastChangedAt should be autopopulated with version 1 and today's date/time.
Reproduction steps
Create a datatable, populate it, enable conflict resolution, attempt to connect a datastore client to it.
The text was updated successfully, but these errors were encountered: