-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does API + Datastore play on the same project? #3005
Comments
I have opened two feature request regarding datastore models: local-only aws-amplify/amplify-category-api#358 and custom resources fed aws-amplify/amplify-category-api#357 |
I have just noticed the difference between working with API and Datastore at model registration time:
Does that means that I could go with:
so that |
DataStore is an extension to the API category and the same resource will be used. DataStore is useful when you are building an app that needs support for offline data, where as using this with API category is useful to run it in a lambda (or some place where you know you won't be offline).
Delta Sync table is not used for conflict detection and resolution. But conflict detection works only when Delta Sync is enabled on the API, as the service does not expose a switch to turn on conflict detection separately |
hi @lazy-var so out of curiosity have you been able to successfully use both in the same project? |
I'm pretty sure you can use both in the same project at the same time; |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
QUESTION
Which Category is your question related to?
API, Datastore.
Which Products is your question related to?
AppSync, AppSync's Conflict Detection , AppSync's
Sync
DynamoDB operation.Hello,
This is an opinionated framework with 'ready to go' use cases, but I am using it because until now I could go custom as well, and I get tons of benefits from it.
I am amazed with Datastore announcement and such an early availability as it will solve plenty of developer needs when developing apps. Thank you very much!
I know it has just been released, and it is in preview, but already some doubts arise, and I couldn't find answers through the docs nor published videos. So here are my concerns:
I can easily find use cases with both tools running on the same app. After reading Model based APIs for API Category check against existence of DataStore amplify-swift#239 (comment) and Convert Amplify.API to protocol amplify-swift#249 (comment) I got concerned as it seems that you can not have a syncable datastore with a non syncable API at the same time. Will API and Datastore be able to play independent?, will them work at the same time? As far as I could test, when using both on the same project only one Appsync API is deployed to the backend. Which of the following alternatives should describe it better?:
·
@model-local
models: current behavior achieved with datastore having "push" flag to false. This would be managed by 'Storage Engine' without 'Sync Engine'.·
@model-cloud
models: current behavior achieved with API (without Datastore enabled). This would be managed by 'API' SDK and 'Apollo Cache'.·
@model-cloud-syncable
models: current behavior achieved when activating Datastore. This would be managed by 'Storage Engine' + 'Sync Engine'.Sync
DynamoDB operation are super Appsync features!🚀, but this time really opinionated 'ready to go' amplify flavored, and with a complete lack of customization😅. The Base table 'scan' part of it, plus the Delta DB indexing and queries doesn't fit my project needs 😅😅.Query.syncModelName.req.vtl
with my own Sync resolver, using queries and my use case indexes instead of the new Sync operation. But I would love more information on how 'Sync Engine' works.Thank you very much in advance.
The text was updated successfully, but these errors were encountered: