graphql-dotnet / graphql-dotnet/graphql-client

GraphQL AppSync support example.

Open
#377 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
648
Forks
136
PR merge metrics
No merged PRs in 30d

Description

Hi, is there any valid example of AppSync subscription??

I saw some closed issues regarding AppSync support but looks like the subscription is not working.
Could you please provide working example for subscription web socket? The query and mutation works perfectly, I also do AWS Cognito auth by adding token in headers and this one is also working. The problem is only on subscription web socket. I made custom web socket connection from scratch and I was able to make it work but I would love to use one module for all my graphql operations on client side.

This one is not working:

```
var userJoinedRequest = new GraphQLRequest {
Query = @"
subscription {
userJoined{
displayName
id
}
}"
};

IObservable> subscriptionStream
= client.CreateSubscriptionStream(userJoinedRequest);

var subscription = subscriptionStream.Subscribe(response =>
{
Console.WriteLine($"user '{response.Data.UserJoined.DisplayName}' joined")
});

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.