awslabs / aws-mobile-appsync-sdk-js

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

feat: Handle AppSync Custom Domains #700

Closed cadam11 closed 10 months ago

cadam11 commented 2 years ago

Issue #, if available:

Fixes #517 for AppSync custom domains

Description of changes:

The issue was originally about supporting an arbitrary URL for websockets, but since AppSync now allows Custom Domains we should be able to rely on a simple replace to get the correct realtime url. This PR adds on one more replace call that appends /realtime to the url if it is not a default (i.e. *.amazonaws.com/graphql) url.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

BigRedAllday commented 2 years ago

Thanks! I need that as well! Custom domains are simply not working right now.

almondheng commented 1 year ago

This change is no longer relevant as aws-appsync-subscription-link v3.1.0 now supports custom domain.