Reputation: 53
We have an AWS Amplify project using AWS GraphQL & App Sync. After upgrading Amplify our previously working App Sync subscriptions now throw an error that I just can't resolve. Please see image below.
The error message is "Connection failed: {"errors":[{"errorType":"DuplicatedOperationError","message":"Duplicated operation with id xxx"
We have a number of different AppSync / GraphQL Subscriptions set up that have worked for a long time. Each subscription is for a different GraphQl Type and mutation, such as:
#Custom Subscription to push a notification when CREATE for a particular user.
onCreateNotificationForUser (userID: ID!): Notification
@aws_subscribe (mutations: ["createNotification"])
#Custom Subscription to push a notification when UPDATED for a particular user.
onUpdateNotificationForUser (userID: ID!): Notification
@aws_subscribe (mutations: ["updateNotification"])
I can provide more information but not really sure what I'm looking for yet even though working on this for a few day. Any suggestion would be greatly appreciated!
Upvotes: 0
Views: 469
Reputation: 53
After some lengthly debugging, we were able to determine that the errors were being thrown due to intermittent network connectivity drops. Specifically, a network router that was periodically dropping packets and the required keep-alives were failing. The error messages of 'duplicate operations' from AppSync certain were not very helpful. In any event, the errors no longer exist and do not appear to have been related to any issue with our schema or client code.
Upvotes: 1