amplify-js: In production datastore doesn't sync

Describe the bug I manually deployed 3 different react app with

  • graphql api dynamodb
  • cognito auth with email
  • everything default with create-react-app settings
  • using typescript with react

Everything syncs in development (localhost) but doen’t sync in deployed app in both cases amplify app domain & custom domain.

auth works in production but graphql api doesn’t sync

I am able to login with email in production but cannot sync.

I deployed manually with

  • directly from console
  • using amplify cli to deploy manually

Both cases no queries are made and no mutations are made. Only offline access is avaialble.

Expected behavior If it can sync on development (localhost) then it should also sync in production (amplifyapp domain or custom domain).

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@apoorvmote Workaround: adding DataStore in my main.ts with no argument worked for me.

import Amplify, { DataStore } from 'aws-amplify';
import amplify from './aws-exports';
Amplify.configure(amplify);
DataStore.configure();

For install unstable release:

yarn add @aws-amplify/datastore@unstable using yarn

npm install @aws-amplify/datastore@unstable using npm

And how do I install unstable version? I am searching on google but not finding anything that works.

Edit: There are some solution that maybe working. But I require Typescript solution. If not available then I will wait for next stable release.