Amazon dynamodb 错误:解析程序与数据源关联
我遇到了无服务器错误:Amazon dynamodb 错误:解析程序与数据源关联,amazon-dynamodb,graphql,serverless,aws-appsync,Amazon Dynamodb,Graphql,Serverless,Aws Appsync,我遇到了无服务器错误: 从serverless.yml配置文件生成时与数据源关联的解析器: # serverless.yml ... mappingTemplates: - dataSource: Wallet type: Query field: walletFromId request: "_dynamo-get-wallet.txt" response: "_generic-result-response.txt" - dataSource: Wal
从serverless.yml配置文件生成时与数据源关联的解析器
:
# serverless.yml
...
mappingTemplates:
- dataSource: Wallet
type: Query
field: walletFromId
request: "_dynamo-get-wallet.txt"
response: "_generic-result-response.txt"
- dataSource: Wallet
type: Query
field: walletsFromUser
request: "_dynamo-get-wallets-from-user.txt"
response: "_generic-result-response.txt"
- dataSource: Wallet
type: Mutation
field: registerWallet
request: "_dynamo-put-wallet.txt"
response: "_generic-result-response.txt"
dataSources:
- type: AMAZON_DYNAMODB
name: Wallet
description: 'Wallet DataSource'
config:
tableName: "${self:custom.stage}-Wallet"
serviceRoleArn: "arn:aws:iam::${self:custom.accountId}:role/${self:custom.appSync.serviceRole}"
...
我还有一个schema.graphql:
type Query {
# query the wallet with given id and get the output with detail info
walletFromId(walletId: String!): Wallet!
# query wallets with given user id and get list of cards
walletsFromUser(userId: String!): [Wallet!]!
}
type Mutation {
# Add a wallet to an existing user
registerWallet(userId: String!, number: String!, cvx: String!, expirationDate: String!): Wallet!
}
type Wallet {
walletId: String!
userId: String!
number: String!
cvx: String!
expirationDate: String!
}
type Subscription {
addWallet: Wallet
@aws_subscribe(mutations: ["registerWallet"])
}
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
对于此错误的含义,我找不到任何线索,而且从生成日志中也找不到任何其他信息。此错误通常意味着您正在尝试删除解析程序当前正在使用的数据源。如果您可以识别指向数据源的冲突解决程序并将其删除,那么您将不会再看到错误消息。是的,它位于aws控制台上。它们位于页面的右半部分,您可以在“架构”选项卡中看到“附加”按钮。是否可以一次删除其中的多个??我有很多方法,希望有一个干净的开始。我相信从模式中删除字段应该做同样的事情,当使用Terraform时