Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated May 1, 2026

LegacyYou are viewing Gen 1 documentation. Switch to the latest Gen 2 docs →

Remove DataStore

Before adding Apollo, remove Amplify DataStore from your project.

Remove the DataStore dependency

Remove com.amplifyframework:aws-datastore (or its version catalog alias) from your build.gradle.kts (or libs.versions.toml).

Remove the DataStore plugin

Remove the DataStore plugin from your Application class:

// Remove this line from your Amplify.addPlugin() calls:
Amplify.addPlugin(AWSDataStorePlugin())

Delete DataStore generated model files

If you used Amplify codegen, delete the generated model classes (for example, Post.java, PostStatus.java, AmplifyModelProvider.java under com/amplifyframework/datastore/generated/model/). These will be replaced by Apollo's generated types.

Remove all Amplify.DataStore.* calls

Remove all DataStore API calls throughout your code:

DataStore CallApollo Replacement
Amplify.DataStore.save()Apollo mutations
Amplify.DataStore.delete()Apollo mutations
Amplify.DataStore.query()Apollo queries
Amplify.DataStore.observe()Apollo subscriptions
Amplify.DataStore.observeQuery()Apollo cache watchers (see Migrate DataStore to Apollo)
Amplify.DataStore.clear()No longer needed (no local DataStore to clear)
Amplify.DataStore.start() / stop()No longer needed

Keep AWSApiPlugin and AWSCognitoAuthPlugin (or other auth plugins) if you still use Amplify for authentication or other services. You only need to remove the DataStore plugin and dependency.

Amplify.DataStore.clear() in sign-out flows: If your sign-out flow calls Amplify.DataStore.clear() to wipe local data before signing out, remove that call entirely — there is no local DataStore to clear after migration.