Open c-davor opened 4 years ago
same here, appsync embedded whole Apollo package into aar with customization to the apollo core, so this Apollo is already out-of-date, we are unable to enjoy any new features provided by latest apollo client (cuz you can't import two aar with same package name into gradle, unless do something like shadowJar, but it's not advised and error-prone).
Issue described below is related to v3.0.1
The library does not allow configuring a separate URL for the WebSocket subscriptions endpoint. Instead it determines the WebSocket endpoint based on the ApiUrl provided in the configuration in WebSocketConnectionManager.getConnectionRequestUrl:
This does not seem to be clearly documented and no proper error is reported when a custom domain name is used for ApiUrl (eg. https://our.custom.domain.com/graphql) when subscription is executed. In our use case the AppSyncSubscriptionCall.Callback.onFailure is raised with "Expected HTTP 101 response but was '400 Bad Request'"
For us, using the "full URL" (eg. https://abcde123565defghj.appsync-api.eu-west-1.amazonaws.com/graphql) is not possible for all use cases.
The only workaround we have currently is to have separate instance of AppSync client for subscriptions, configured with the full URL and additional instances for all other GraphQL operations configured with URL with a custom domain name.
Please provide additional configuration property allowing configuration of the WebSocket endpoint for GraphQL subscriptions.