我正在为我的 APP 使用 AppSync。这是我的 Schema.graphql 文件的快速浏览
type Item @model
@auth(rules: [
{ allow: public, provider: apiKey, operations: [read] },
{ allow: groups, groups: ["admin"] }
]) {
id: ID!
name: String!
soldUnits: String!
soldAs: [Float!]
price: Float!
isAvailable: Boolean!
availableAmount: Float!
category: String!
isVeg: Boolean!
offer: [String!]
about: String
storage: String
benifits: String
otherInfo: String
rating: Int
keywords: [String!]
reviews: [String]
images: [String]
updatedBy: String
addedBy: String
qty: Int
inventroy: Inventory @connection(name: "ItemInventory")
}
type User @model {
id: ID! …Run Code Online (Sandbox Code Playgroud)