Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the AWSSDK.AppSync .net Core NuGet package to perform mutations and query data?

I want to send chat messages using AppSync from a .net Core backend, using the nuget package AWSSDK.AppSync. But I Can't find any guide or sample code to do so.

I'm trying to code something similar to the AWS mobile sample application AppSync Chat Starter Angular. The goal is to have a conversation between the user (on a browser) and my backend. There are many samples for iOS, Android, web and react native, where I could find some clues on how to do it, but couldn't manage to get it working in .net core. The best documentation I've found so far is the official Amazon.AppSync API but there you'll find only classes and fields descriptions, not sample code.

I have that Angular AppSync Chat sample app running fine. I did manage to run the React sample app too. Everything goes smoothly with those. However I'm unable to fully understand what's going on only by reading the angular and react sample code, especially because I'm not proficient on those.

Would be great to have a sample code on how to initialise the AmazonAppSyncClient, run some queries, perform some mutations, subscribe/unsubscribe and set background tasks.

like image 637
Rui Holdorf Avatar asked Oct 20 '25 12:10

Rui Holdorf


1 Answers

AWSSDK.AppSync Is just for managing AppSync, to query GraphQl server provided by AppSync you need GraphQL.Client.

like image 113
hash Avatar answered Oct 22 '25 01:10

hash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!