amplify-js
amplify-js copied to clipboard
Support `ws` for appsync realtime connection
Is this related to a new or existing framework?
No response
Is this related to a new or existing API?
GraphQL API
Is this related to another service?
No response
Describe the feature you'd like to request
Support ws
for realtime endpoint in order to test with appsync-simulator
Describe the solution you'd like
https://github.com/aws-amplify/amplify-js/blob/3629a7b8ec2bb06ddf885ee5ee18296dc93bcffb/packages/api-graphql/src/Providers/AWSAppSyncRealTimeProvider/index.ts#L751-L754
Change to ws
if the input endpoint is http://
,
// Creating websocket url with required query strings
discoverableEndpoint = discoverableEndpoint
.replace('https://', 'wss://')
.replace('http://', 'ws://');
Describe alternatives you've considered
Using the dangerously_connect_to_http_endpoint_for_testing
flag to enable this feature
Additional context
No response
Is this something that you'd be interested in working on?
- [X] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change
Hello, @dominhhai and thank you for opening this issue. I'll mark this as a feature request at this point and review it with our team internally. If there's further questions or progress, we'll ping you in a new comment!