aws-appsync-community
aws-appsync-community copied to clipboard
Appsync subscription filtering via websocket + postman
I'm trying to figure out a way to filter appsync subscriptions.
Thanks, to Sunac's answer here: https://github.com/aws/aws-appsync-community/issues/195 , i was able to subscribe to the websocket url.
Also, with the help of below payload, im able to listen to mutations :
{ "id": "some random uuid", "payload": { "data": "{"query":"subscription MySubscription {\n onCreate {\n someId \n anotherId \n }\n }","variables":{}}", "extensions": { "authorization": { "x-api-key": "some key", "host": "appsync-host-at-amazon.com" } } }, "type": "start" }
I'm looking for a way to put a filter on the subscription though. I was able to do the same on aws appsync console, but cannot achieve it on postman..
Thanks !
Hey, to filter, you should look at using subscription arguments in your query. see here for examples: https://docs.aws.amazon.com/appsync/latest/devguide/aws-appsync-real-time-data.html#using-subscription-arguments
True, but that doesn't seem to be working in my payload in Postman.. i believe the same syntax won't work there..