awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
919 stars 266 forks source link

createSubscriptionHandshakeLink documentation is not accurate with MQTT deprecation #628

Open kcwinner opened 3 years ago

kcwinner commented 3 years ago

Note: If your issue/feature-request/question is regarding the AWS AppSync service, please log it in the official AWS AppSync forum

Do you want to request a feature or report a bug? Documentation

What is the current behavior? README states

For version 3+, the createSubscriptionHandshakeLink can also be configured the same as createAuthLink. This will have the same behavior as mentioned here for version 3+ Please see the example below:
...
...

What is the expected behavior? With the mqtt deprecation it is no longer possible to configure the createSubscriptionHandshakeLink as createSubscriptionHandshakeLink(url, httpLink) Instead, you must use createSubscriptionHandshakeLink({ url, region, auth }) or it will result to using MQTT

bryandowning commented 3 years ago

Thanks for this — for anyone suddenly running into a 400 error from AppSync saying, "Subscriptions over MQTT is not supported.", this is probably your issue.

Boubaker93 commented 3 years ago

Thank you very much! This also helped me to fix this MQTT error i was getting.

lochawala commented 3 years ago

Thanks, you save my day