“放大推动力”在 AWS Appsync 中创建新的类型变量 - React Native
当我执行放大推送时,我会在 Appsync 架构中获得一些变量。
这是来自 React Native amplify/backend 文件夹中的 schema.graphql 。
type Botdata @model (subscriptions: null){
client_id: String!
id: String!
lock_status: Float
}
这就是我在放大推送之后在 Appsync 架构上得到的结果,
type Botdata {
client_id: String!
id: String!
lock_status: Float
createdAt: AWSDateTime!
updatedAt: AWSDateTime!
_version: Int!
_deleted: Boolean
_lastChangedAt: AWSTimestamp!
}
这会导致整个操作出现未定义的类型错误。请帮我。谢谢!
When I do amplify push
, I get a few variables in the Appsync Schema.
This is from schema.graphql in react native amplify/backend folder.
type Botdata @model (subscriptions: null){
client_id: String!
id: String!
lock_status: Float
}
And this is what I get on the Appsync Schema after amplify push
type Botdata {
client_id: String!
id: String!
lock_status: Float
createdAt: AWSDateTime!
updatedAt: AWSDateTime!
_version: Int!
_deleted: Boolean
_lastChangedAt: AWSTimestamp!
}
This causes my undefined type error for the entire operation. Please help me. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您开启了乐观并发。当应用程序和数据库之间存在冲突数据版本时,这很有用,但您需要:
如果您不需要乐观并发,您可以关闭它:
amplify update api
graphql
禁用冲突检测
希望我的回答对您有帮助。
Maybe you was turn on Optimistic Concurrency. This helpful when you have conflict data version between app and database but you need:
If you don't need Optimistic Concurrency you can turn of that:
amplify update api
graphql
Disable conflict detection
Hope my answer helpful for you.