0

Context

When using AWS Amplify JS, and specifically the DataStore part of the SDK, the models that you specify in your schema.graphql each get an associated DynamoDB table:

schema.graphql

type Blog @model {
  id: ID!
  name: String!
  posts: [Post] @connection(name: "BlogPosts")
}
type Post @model {
  id: ID!
  title: String!
  blog: Blog @connection(name: "BlogPosts")
  comments: [Comment] @connection(name: "PostComments")
}
type Comment @model {
  id: ID!
  content: String
  post: Post @connection(name: "PostComments")
}

This corresponds to 4 DynamoDB tables that get created in AWS

  • Blog-somerandomstring-dev — (makes sense)
  • Post-somerandomstring-dev — (makes sense)
  • Comment-somerandomstring-dev — (makes sense)
  • AmplifyDataStore-somerandomstring-dev — (where does this table come from?)

Question

Given the above, what is the explanation behind, and/or function of this extra table (AmplifyDataStore-somerandomstring-dev)?

Kevin Wang
  • 644
  • 1
  • 8
  • 20

1 Answers1

0

Answer

This extra table, not created by any particular @model in your Amplify Graphql schema is called the Delta Sync Table and its purpose to help with Conflict Detection and Sync

This may not mean much, but the rest of the doc explains how Amplify/AppSync go about conflict resolution for your data.

Kevin Wang
  • 644
  • 1
  • 8
  • 20