amplify-swift/AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginAuthCogni.../singleauth-cognito-schema.g...

37 lines
821 B
GraphQL

type TodoExplicitOwnerField
@model
@auth(rules: [{ allow: owner, ownerField: "owner", operations: [read, create, update, delete] }]) {
id: ID!
content: String!
owner: String
}
type TodoImplicitOwnerField
@model
@auth(rules: [ { allow: owner } ]) {
id: ID!
content: String!
}
type TodoCustomOwnerImplicit @model @auth(rules: [{ allow: owner, ownerField: "dominus" }]) {
id: ID!
title: String!
}
type TodoCustomOwnerExplicit @model @auth(rules: [{ allow: owner, ownerField: "dominus" }]) {
id: ID!
title: String!
dominus: String
}
type TodoCognitoExplicitOperations @model
@auth(rules: [{ allow: owner, operations: [read, create, delete] }]) {
id: ID!
title: String!
}
type TodoCognitoPrivate @model @auth(rules: [{ allow: private }]) {
id: ID!
title: String!
}