What i'm trying to achieve: custom javascript resolver for a subscription.
I understand that when you use appsync and create a type for e.g.
type chatMessage { channel: String! userId: String! text: String! id: ID! }
appsync will automatically generate queries, mutations and subscriptions for you. And they work, even though the auto-generated subscriptions all don't seem to have a resolver. Why is that so?
When i try to attach a custom javascript resolver on onCreateChatMessage, it failed with
"Connection failed: {\"errors\":[{\"errorType\":\"Code\",\"message\":\"Runtime Error\"}]}".
I tried creating a new subscription, and attached the resolver to it, but it failed too.
The resolver i added was based on the appsync doc
What am i doing wrong? The logs are not showing any errors either :/



Dealing with the same problem. I haven't figure it out but with your example, the doc says to set your Data Source to a NONE type. It looks like you have it set to your mutation's Data Source.