Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for /graphql/realtime url for Mock #491

Open
2 tasks
yuth opened this issue Feb 3, 2022 · 0 comments
Open
2 tasks

Add support for /graphql/realtime url for Mock #491

yuth opened this issue Feb 3, 2022 · 0 comments
Labels
feature-request New feature or request GraphQL

Comments

@yuth
Copy link

yuth commented Feb 3, 2022

Is this related to a new or existing framework?

New framework

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

Amplify JS has special handling for Websocket subscription. when the AppSync API is using custom domain. Please add support for the same when using mock. When running mock server a special variable aws_appsync_dangerously_connect_to_http_endpoint_for_testing is set to allow to connect using unsecure websocket.

https://github.com/aws-amplify/amplify-js/blob/bb60060d30c7463d1893b7678ebc18e959b46990/packages/pubsub/src/Providers/AWSAppSyncRealTimeProvider.ts#L144-L148

https://github.com/aws-amplify/amplify-js/blob/bb60060d30c7463d1893b7678ebc18e959b46990/packages/pubsub/src/Providers/AWSAppSyncRealTimeProvider.ts#L170-L172

CLI has a bug report(aws-amplify/amplify-category-api#122) to add support to /graphql/realtime endpoint and we would like feature parity in the libraries as well

Describe the solution you'd like

When aws_appsync_dangerously_connect_to_http_endpoint_for_testing is set, add /realtime to the websocket url

Describe alternatives you've considered

Keeping the mock subscription server in /grpahql but it would degrade the DX

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@yuth yuth added the feature-request New feature or request label Feb 3, 2022
@stocaaro stocaaro transferred this issue from aws-amplify/amplify-js Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request GraphQL
Projects
None yet
Development

No branches or pull requests

2 participants