Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(amplify-codegen-appsync-model-plugin): iOS add suport for auth (a…
…ws-amplify#4329) Updated model gen to add authRules when @auth directive is used in schema A schema with @auth directive type Post @model @auth(rules: [{ allow: owner }]) { id: ID! title: String! owner: String! } will generate the following authRule in Post+schema.swift import Amplify import Foundation extension Post { public static let schema = defineSchema { model in let post = Post.keys model.authRules = [ rule(allow: .owner, ownerField: "owner", identityClaim: "cognito:username", operations: [.create, .update, .delete, .read]) ] model.pluralName = "Posts" } }
- Loading branch information