Skip to content

feat(docs): add DataStore migration guide with Apollo Client patterns#8540

Draft
ahmedhamouda78 wants to merge 3 commits intoaws-amplify:mainfrom
ahmedhamouda78:docs/datastore-investigation
Draft

feat(docs): add DataStore migration guide with Apollo Client patterns#8540
ahmedhamouda78 wants to merge 3 commits intoaws-amplify:mainfrom
ahmedhamouda78:docs/datastore-investigation

Conversation

@ahmedhamouda78
Copy link
Copy Markdown
Member

@ahmedhamouda78 ahmedhamouda78 commented Apr 1, 2026

Description of changes:

Adds a comprehensive migration guide for Gen 1 developers who want to replace DataStore with Apollo Client while keeping their Gen 1 backend. The guide covers three strategies based on application needs:

  • API Only — direct GraphQL queries/mutations via Apollo Client, recommended for most apps
  • Local Caching — persistent cache with optimistic updates via apollo3-cache-persist
  • Offline-First — full offline architecture with Dexie.js, mutation queue, sync engine, and conflict resolution

The guide includes 8 pages: strategy decision framework, Apollo Client setup with Cognito auth, CRUD operation migration, relationship migration, local caching, offline support, and advanced patterns (composite keys, codegen, React component migration). All pages include before/after code examples mapping DataStore APIs to their Apollo Client equivalents, with platform-specific content for React, Angular, Vue, Next.js, React Native, and vanilla JS.

Related GitHub issue #, if available:

Instructions

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • Swift
  • Android
  • Flutter
  • React Native

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

- Add comprehensive migration guide index page for DataStore to Apollo Client
- Add choose-strategy guide for migration approach selection
- Add set-up-apollo guide for Apollo Client configuration
- Add migrate-crud-operations guide for query and mutation patterns
- Add migrate-relationships guide for handling data relationships
- Add add-local-caching guide for persistent cache and optimistic updates
- Add build-offline-support guide for offline-first functionality
- Add advanced-patterns guide for complex migration scenarios
- Update directory structure to include new migrate-from-datastore section with nested pages
- Provides step-by-step guidance for developers transitioning from DataStore to Apollo Client
@ahmedhamouda78 ahmedhamouda78 requested a review from a team as a code owner April 1, 2026 12:47
@ahmedhamouda78 ahmedhamouda78 added the run-tests Label to run tests on PRs from a fork label Apr 1, 2026
@ahmedhamouda78 ahmedhamouda78 force-pushed the docs/datastore-investigation branch from cafe758 to c222f63 Compare April 1, 2026 12:57
@ahmedhamouda78 ahmedhamouda78 marked this pull request as draft April 1, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Label to run tests on PRs from a fork

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant