Amplify-js: AppSync Subscriptions: Object is not a constructor - new Observable

Created on 29 Oct 2019  路  2Comments  路  Source: aws-amplify/amplify-js

Describe the bug
If i set subscriptions, i get this error:

Simulator Screen Shot - iPhone 11 - 2019-10-29 at 14 59 27

"aws-amplify": "^1.2.3",
"aws-amplify-react": "^2.5.2",
"aws-amplify-react-native": "^2.1.12",
export const subscription = async (ressource, doThan) => {
  try {
    API.graphql(graphqlOperation(subscriptions[ressource])).subscribe({
      next: data => doThan(data)
    });
  } catch (e) {
    alert(e);
    return { error: e };
  }
};
 EventStore.subscriptionToEvent("onCreateEvent", data =>
      this.doThanEvent(data)
    );
bug

Most helpful comment

@davidbiller this has been fixed in the new stable release, please try and let us know if that works.

All 2 comments

@davidbiller this has been fixed in the new stable release, please try and let us know if that works.

@davidbiller this has been fixed in the new stable release, please try and let us know if that works.

Good Work :)

Was this page helpful?
0 / 5 - 0 ratings