我正在对发布/订阅消息使用Appsync订阅。我读过一些关于订阅的文章(比如:),它们都提到了specifying a GraphQL schema directive on a mutation。在我的例子中,我有一个由dynamodb streams触发的lambda,这个lambda需要将事件发布给订阅者。如何在Appsync中实现此功能?我找不到任何可以用来将事件发布到Appsync的接口
我正试着从和开始。
到目前为止,我已经按照AWS文档(特别是和)成功地创建了一个 (第三个代码片段),并启用了AppSync GraphQL API,如下所示:
$ amplify add api
? Please select from one of the below mentioned services GraphQL
? Provide API name: MySampleTodoAPI
? Choose an authorization type for the API API key
? Do you have an annotated GraphQL schema? No
? D
Api的V3为此提供了一个REST接口:
POST /repos/:owner/:回购/发行
{
"title": "Found a bug",
"body": "I'm having a problem with this.",
"assignees": [
"octocat"
],
"milestone": 1,
"labels": [
"bug"
]
}
您甚至可以使用GraphQL