Hi i am new in aws AppSync and GraphQl. I have a problem with subscription. I want to get notifiend in real time when new post is posted
Here is my graphql schema ``
type Mutation {
addPost(
id: ID!,
author: String!,
title: String,
contennt: String,
url: String
): Post!
updatePost(
id: ID!,
author: String!,
title: String,
content: String,
ups: Int!
): Post!
deletePost(id: ID): Post!
}
type Post {
id: ID!
author: String!
title: String!
url: String
content: String
ups: Int!
}
type Query {
allPost: [Post]
getPost(id: ID!): Post
}
type Subscription {
newPost: Post
@aws_subscribe(mutations: ["addPost"])
}
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
``
Here is my Query for subs:
subscription NewPostSub{
newPost{
__typename
title
content
author
url
}
}
Im getting error that provided key element doesnt match a schema, in dynamodb table pk is id and i generated mapping template. Thank you