Closed ShariqAteeq closed 1 year ago
Hi @ShariqAteeq
Please note that this repository refers to the AppSync plugin for thee serverless framework. You question seems to be about AppSync in general (not this plugin). You might have a better chance asking this somewhere else, for example here
However, I'll try to answer your question.
I am missing some context here, but he error seems to say that Notifications
is not a valid return type for a subscription.
It looks like it's not an object. You did not share the full schema, so I can't really tell what is wrong with it, sorry.
`type Subscription { onNotified(userId: ID!, type: NotificationType): Notifications @aws_subscribe( mutations: [ "notifyDMed"
"notifyRetweeted"
}`
Request Mapping Template
{ "version": "2018-05-29", "payload": $util.toJson($context.arguments) }
Response Mapping Template
{$util.toJson($context.result)}
Error Message:
"Connection failed: {\"errors\":[{\"message\":\"Can't resolve '/onNotified'. Abstract type 'Notifications' must resolve to an Object type at runtime for field 'Subscription.onNotified'. Could not determine the exact type of Notifications. Missing __typename key on value.'\"}]}"