Closed IntelligentDevelopments closed 4 years ago
Currently there is no automation in the CLI which will setup the Pipeline resolvers which are needed for Delta Sync, so the Todo schema will not work. You'll need something like this: https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-delta-sync.html#one-click-setup
However there are some upcoming enhancements to automate Delta Sync in Amplify. I'd suggest holding tight for a couple weeks to see if they meet your needs.
@IntelligentDevelopments we have just released DataStore which includes Delta Sync and is a more streamlined setup, including AppSync integration: https://aws-amplify.github.io/docs/js/datastore
While you can still use AppSync as described above manually configuring Delta Sync queries and resolvers it is recommended to use DataStore going forward for offline use cases.
@undefobj thanks for letting us know.
We've spent some time looking at DataStore and we've got some questions. I'll add those as new issues.
I initially submitted my question on the appSync forum, but have received no response there.
Do you want to request a feature or report a bug? bug
What is the current behavior? when calling AWSAppSyncClient.sync including a base query and a subscription query:
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. use amplify cli to create a new project with a graphql api using the todo schema use vue/cli to create a new vue app set up auth using cognito user pools create a new user in the app pool and use amplify-sign-in to sign in update main.ts to match the following:
What is the expected behavior? I expected delta sync to populate the offline cache with the results of the base query and to also listen for new todos, placing those in the offline cache. If i comment out subscriptionQuery in syncOptions, the offline cache does in fact get populated with the results from the base query. If there is something wrong with my subscriptionQuery object or with the options object as a whole, i would expect an error message.
Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions? I created the test app today, so i think i'm on all latest versions:
We're loving amplify and appSync so far, hoping we can get past this road block. Let me know if there is any additional info required.