Open kiennt300599 opened 1 month ago
To add headers to the websocket connection, you need to configure them via GraphQLHttpClientOptions.ConfigureWebsocketOptions
@rose-a
Thanks! I configured it following ConfigureWebsocketOptions
, and now there are no more errors. However, I'm still not receiving any data from the websocket. So, I logged _subscription
after Subscribe
, and I received the following error:
System.Reactive.Linq.ObservableImpl.SelectMany
2+ObservableSelector+_[System.Tuple
2[GraphQL.GraphQLResponse1[System.String],System.Exception],GraphQL.GraphQLResponse
1[System.String]]
Do you know what might be causing this? Please give me some ideas to resolve it.
I've got no experience using AppSync myself, but there are people who got it working...
Perhaps this thread can help you: https://github.com/graphql-dotnet/graphql-client/issues/377
I am trying to use AppSync for my project. Although I have handled everything according to the design documentation, I keep encountering the error:
{"payload":{"errors":[{"message":"Required headers are missing.","errorCode":400}]},"type":"connection_error"}
every time I create a subscription to listen. Is this a bug, or am I missing something? Please help me resolve this issue.public static class AppSyncService { private static GraphQLHttpClient _client; private static IDisposable _subscription; private static string _apiUrl; private static string _wssUrl; private static string _apiKey; private static string _serverID; public static event Action OnNewItemReceived;
}