From 650df694ee56488fc408074772926127987ad642 Mon Sep 17 00:00:00 2001 From: Michael law <1365977+lawmicha@users.noreply.github.com> Date: Thu, 4 Jun 2020 14:52:16 -0700 Subject: [PATCH] Replace Blog with Article --- Amplify.xcodeproj/project.pbxproj | 16 ++-- .../GraphQLRequestAuthRuleTests.swift | 82 +++++++++---------- ...Blog+Schema.swift => Article+Schema.swift} | 14 ++-- .../Models/{Blog.swift => Article.swift} | 2 +- AmplifyTestCommon/Models/schema.graphql | 2 +- 5 files changed, 58 insertions(+), 58 deletions(-) rename AmplifyTestCommon/Models/{Blog+Schema.swift => Article+Schema.swift} (72%) rename AmplifyTestCommon/Models/{Blog.swift => Article.swift} (95%) diff --git a/Amplify.xcodeproj/project.pbxproj b/Amplify.xcodeproj/project.pbxproj index a294d11abd..62d198be94 100644 --- a/Amplify.xcodeproj/project.pbxproj +++ b/Amplify.xcodeproj/project.pbxproj @@ -12,8 +12,6 @@ 210922572359693900CEC295 /* BasicAnalyticsEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210922562359693800CEC295 /* BasicAnalyticsEvent.swift */; }; 2109225A23596BCD00CEC295 /* AnalyticsCategoryBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2109225923596BCD00CEC295 /* AnalyticsCategoryBehavior.swift */; }; 210B3E34245CB73400F43848 /* AuthRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210B3E33245CB73400F43848 /* AuthRule.swift */; }; - 210B3E36245CB86500F43848 /* Blog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210B3E35245CB86500F43848 /* Blog.swift */; }; - 210B3E39245CB88D00F43848 /* Blog+Schema.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210B3E38245CB88D00F43848 /* Blog+Schema.swift */; }; 210DBC122332B3C0009B9E51 /* StorageDownloadFileOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210DBC112332B3C0009B9E51 /* StorageDownloadFileOperation.swift */; }; 210DBC142332B3C6009B9E51 /* StorageGetURLOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210DBC132332B3C6009B9E51 /* StorageGetURLOperation.swift */; }; 210DBC162332B3CB009B9E51 /* StorageDownloadDataOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 210DBC152332B3CB009B9E51 /* StorageDownloadDataOperation.swift */; }; @@ -71,6 +69,8 @@ 21420AA0237222A900FA140C /* AWSAuthorizationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21420A8D237222A900FA140C /* AWSAuthorizationType.swift */; }; 2144226C234BDD9B009357F7 /* StorageUploadFileRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2144226B234BDD9B009357F7 /* StorageUploadFileRequest.swift */; }; 2144226E234BDE23009357F7 /* StorageUploadFileOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2144226D234BDE23009357F7 /* StorageUploadFileOperation.swift */; }; + 214F49CD24898E8500DA616C /* Article.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214F49CB24898E8400DA616C /* Article.swift */; }; + 214F49CE24898E8500DA616C /* Article+Schema.swift in Sources */ = {isa = PBXBuildFile; fileRef = 214F49CC24898E8500DA616C /* Article+Schema.swift */; }; 21558E3E237BB4BF0032A5BB /* GraphQLRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21558E3D237BB4BF0032A5BB /* GraphQLRequest.swift */; }; 21558E40237CB8640032A5BB /* GraphQLError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21558E3F237CB8640032A5BB /* GraphQLError.swift */; }; 216879FE23636A0A004A056E /* RepeatingTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 216879FD23636A0A004A056E /* RepeatingTimer.swift */; }; @@ -635,8 +635,6 @@ 210922562359693800CEC295 /* BasicAnalyticsEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicAnalyticsEvent.swift; sourceTree = ""; }; 2109225923596BCD00CEC295 /* AnalyticsCategoryBehavior.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsCategoryBehavior.swift; sourceTree = ""; }; 210B3E33245CB73400F43848 /* AuthRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthRule.swift; sourceTree = ""; }; - 210B3E35245CB86500F43848 /* Blog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Blog.swift; sourceTree = ""; }; - 210B3E38245CB88D00F43848 /* Blog+Schema.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blog+Schema.swift"; sourceTree = ""; }; 210DBC112332B3C0009B9E51 /* StorageDownloadFileOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageDownloadFileOperation.swift; sourceTree = ""; }; 210DBC132332B3C6009B9E51 /* StorageGetURLOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageGetURLOperation.swift; sourceTree = ""; }; 210DBC152332B3CB009B9E51 /* StorageDownloadDataOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageDownloadDataOperation.swift; sourceTree = ""; }; @@ -706,6 +704,8 @@ 21420A8D237222A900FA140C /* AWSAuthorizationType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AWSAuthorizationType.swift; sourceTree = ""; }; 2144226B234BDD9B009357F7 /* StorageUploadFileRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageUploadFileRequest.swift; sourceTree = ""; }; 2144226D234BDE23009357F7 /* StorageUploadFileOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageUploadFileOperation.swift; sourceTree = ""; }; + 214F49CB24898E8400DA616C /* Article.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Article.swift; sourceTree = ""; }; + 214F49CC24898E8500DA616C /* Article+Schema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Article+Schema.swift"; sourceTree = ""; }; 21558E3D237BB4BF0032A5BB /* GraphQLRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphQLRequest.swift; sourceTree = ""; }; 21558E3F237CB8640032A5BB /* GraphQLError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphQLError.swift; sourceTree = ""; }; 215F4BCAAB89FA54AA121BDE /* Pods-AmplifyAWSPlugins-AWSPluginsCore-AWSPinpointAnalyticsPlugin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AmplifyAWSPlugins-AWSPluginsCore-AWSPinpointAnalyticsPlugin.release.xcconfig"; path = "Target Support Files/Pods-AmplifyAWSPlugins-AWSPluginsCore-AWSPinpointAnalyticsPlugin/Pods-AmplifyAWSPlugins-AWSPluginsCore-AWSPinpointAnalyticsPlugin.release.xcconfig"; sourceTree = ""; }; @@ -2184,8 +2184,8 @@ children = ( B952182F237E21B900F53237 /* schema.graphql */, FAF512AD23986791001ADF4E /* AmplifyModels.swift */, - 210B3E35245CB86500F43848 /* Blog.swift */, - 210B3E38245CB88D00F43848 /* Blog+Schema.swift */, + 214F49CB24898E8400DA616C /* Article.swift */, + 214F49CC24898E8500DA616C /* Article+Schema.swift */, B9521830237E21B900F53237 /* Comment.swift */, B952182E237E21B900F53237 /* Comment+Schema.swift */, FAA2E8BB239FFC7700E420EA /* MockModels.swift */, @@ -4395,6 +4395,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 214F49CD24898E8500DA616C /* Article.swift in Sources */, B9FAA116238799D3009414B4 /* Author.swift in Sources */, B9521833237E21BA00F53237 /* Comment+Schema.swift in Sources */, FA176ED7238503C200C5C5F9 /* HubListenerTestUtilities.swift in Sources */, @@ -4417,12 +4418,10 @@ FACA36152327FC39000E74F6 /* MessageReporter.swift in Sources */, FAF512AE23986791001ADF4E /* AmplifyModels.swift in Sources */, B9FAA11C23879B35009414B4 /* Book.swift in Sources */, - 210B3E39245CB88D00F43848 /* Blog+Schema.swift in Sources */, B9FAA11423878CEA009414B4 /* UserProfile+Schema.swift in Sources */, FACA361D2327FC84000E74F6 /* MockAPICategoryPlugin.swift in Sources */, B9FAA11023878C5E009414B4 /* UserProfile.swift in Sources */, B9AA09F12473CA29000E6FBB /* PostStatus.swift in Sources */, - 210B3E36245CB86500F43848 /* Blog.swift in Sources */, B9FAA12023879BD0009414B4 /* BookAuthor+Schema.swift in Sources */, 21F40A4023A295470074678E /* TestCommonConstants.swift in Sources */, B9521835237E21BA00F53237 /* Comment.swift in Sources */, @@ -4431,6 +4430,7 @@ B9FAA10E23878BF3009414B4 /* UserAccount.swift in Sources */, 21F40A3C23A2952C0074678E /* AuthHelper.swift in Sources */, B4F3E9FA24314ECC00F23296 /* MockAuthCategoryPlugin.swift in Sources */, + 214F49CE24898E8500DA616C /* Article+Schema.swift in Sources */, FA1846EE23998E44009B9D01 /* MockAPIResponders.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/GraphQLRequest/GraphQLRequestAuthRuleTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/GraphQLRequest/GraphQLRequestAuthRuleTests.swift index e669543d5a..0676a67f32 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/GraphQLRequest/GraphQLRequestAuthRuleTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/GraphQLRequest/GraphQLRequestAuthRuleTests.swift @@ -13,7 +13,7 @@ import XCTest class GraphQLRequestAuthRuleTests: XCTestCase { override func setUp() { - ModelRegistry.register(modelType: Blog.self) + ModelRegistry.register(modelType: Article.self) } override func tearDown() { @@ -21,16 +21,16 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } func testQueryGraphQLRequest() throws { - let blog = Blog(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) - var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: blog.modelName, operationType: .query) + let article = Article(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) + var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: article.modelName, operationType: .query) documentBuilder.add(decorator: DirectiveNameDecorator(type: .get)) - documentBuilder.add(decorator: ModelIdDecorator(id: blog.id)) + documentBuilder.add(decorator: ModelIdDecorator(id: article.id)) documentBuilder.add(decorator: ConflictResolutionDecorator()) documentBuilder.add(decorator: AuthRuleDecorator(.query)) let document = documentBuilder.build() let documentStringValue = """ - query GetBlog($id: ID!) { - getBlog(id: $id) { + query GetArticle($id: ID!) { + getArticle(id: $id) { id authorNotes content @@ -44,7 +44,7 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } """ - let request = GraphQLRequest.query(modelName: blog.modelName, byId: blog.id) + let request = GraphQLRequest.query(modelName: article.modelName, byId: article.id) XCTAssertEqual(document.stringValue, request.document) XCTAssertEqual(documentStringValue, request.document) @@ -53,20 +53,20 @@ class GraphQLRequestAuthRuleTests: XCTestCase { XCTFail("The request doesn't contain variables") return } - XCTAssertEqual(variables["id"] as? String, blog.id) + XCTAssertEqual(variables["id"] as? String, article.id) } func testCreateMutationGraphQLRequest() throws { - let blog = Blog(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) - var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: blog.modelName, operationType: .mutation) + let article = Article(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) + var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: article.modelName, operationType: .mutation) documentBuilder.add(decorator: DirectiveNameDecorator(type: .create)) - documentBuilder.add(decorator: ModelDecorator(model: blog)) + documentBuilder.add(decorator: ModelDecorator(model: article)) documentBuilder.add(decorator: ConflictResolutionDecorator()) documentBuilder.add(decorator: AuthRuleDecorator(.mutation)) let document = documentBuilder.build() let documentStringValue = """ - mutation CreateBlog($input: CreateBlogInput!) { - createBlog(input: $input) { + mutation CreateArticle($input: CreateArticleInput!) { + createArticle(input: $input) { id authorNotes content @@ -79,7 +79,7 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } } """ - let request = GraphQLRequest.createMutation(of: blog) + let request = GraphQLRequest.createMutation(of: article) XCTAssertEqual(document.stringValue, request.document) XCTAssertEqual(documentStringValue, request.document) @@ -93,21 +93,21 @@ class GraphQLRequestAuthRuleTests: XCTestCase { XCTFail("The document variables property doesn't contain a valid input") return } - XCTAssert(input["content"] as? String == blog.content) + XCTAssert(input["content"] as? String == article.content) XCTAssertFalse(input.keys.contains("owner")) } func testUpdateMutationGraphQLRequest() throws { - let blog = Blog(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) - var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: blog.modelName, operationType: .mutation) + let article = Article(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) + var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: article.modelName, operationType: .mutation) documentBuilder.add(decorator: DirectiveNameDecorator(type: .update)) - documentBuilder.add(decorator: ModelDecorator(model: blog)) + documentBuilder.add(decorator: ModelDecorator(model: article)) documentBuilder.add(decorator: ConflictResolutionDecorator()) documentBuilder.add(decorator: AuthRuleDecorator(.mutation)) let document = documentBuilder.build() let documentStringValue = """ - mutation UpdateBlog($input: UpdateBlogInput!) { - updateBlog(input: $input) { + mutation UpdateArticle($input: UpdateArticleInput!) { + updateArticle(input: $input) { id authorNotes content @@ -120,7 +120,7 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } } """ - let request = GraphQLRequest.updateMutation(of: blog) + let request = GraphQLRequest.updateMutation(of: article) XCTAssertEqual(document.stringValue, request.document) XCTAssertEqual(documentStringValue, request.document) @@ -133,21 +133,21 @@ class GraphQLRequestAuthRuleTests: XCTestCase { XCTFail("The document variables property doesn't contain a valid input") return } - XCTAssert(input["content"] as? String == blog.content) + XCTAssert(input["content"] as? String == article.content) XCTAssertFalse(input.keys.contains("owner")) } func testDeleteMutationGraphQLRequest() throws { - let blog = Blog(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) - var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: blog.modelName, operationType: .mutation) + let article = Article(content: "content", createdAt: .now(), owner: nil, authorNotes: nil) + var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelName: article.modelName, operationType: .mutation) documentBuilder.add(decorator: DirectiveNameDecorator(type: .delete)) - documentBuilder.add(decorator: ModelIdDecorator(id: blog.id)) + documentBuilder.add(decorator: ModelIdDecorator(id: article.id)) documentBuilder.add(decorator: ConflictResolutionDecorator()) documentBuilder.add(decorator: AuthRuleDecorator(.mutation)) let document = documentBuilder.build() let documentStringValue = """ - mutation DeleteBlog($input: DeleteBlogInput!) { - deleteBlog(input: $input) { + mutation DeleteArticle($input: DeleteArticleInput!) { + deleteArticle(input: $input) { id authorNotes content @@ -161,7 +161,7 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } """ - let request = GraphQLRequest.deleteMutation(modelName: blog.modelName, id: blog.id) + let request = GraphQLRequest.deleteMutation(modelName: article.modelName, id: article.id) XCTAssertEqual(document.stringValue, request.document) XCTAssertEqual(documentStringValue, request.document) @@ -174,13 +174,13 @@ class GraphQLRequestAuthRuleTests: XCTestCase { XCTFail("The document variables property doesn't contain a valid input") return } - XCTAssertEqual(input["id"] as? String, blog.id) + XCTAssertEqual(input["id"] as? String, article.id) XCTAssertFalse(input.keys.contains("owner")) XCTAssertFalse(input.keys.contains("authorNotes")) } func testOnCreateSubscriptionGraphQLRequest() throws { - let modelType = Blog.self as Model.Type + let modelType = Article.self as Model.Type let ownerId = "111" var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelType: modelType, operationType: .subscription) documentBuilder.add(decorator: DirectiveNameDecorator(type: .onCreate)) @@ -188,8 +188,8 @@ class GraphQLRequestAuthRuleTests: XCTestCase { documentBuilder.add(decorator: AuthRuleDecorator(.subscription(.onCreate, ownerId))) let document = documentBuilder.build() let documentStringValue = """ - subscription OnCreateBlog($owner: String!) { - onCreateBlog(owner: $owner) { + subscription OnCreateArticle($owner: String!) { + onCreateArticle(owner: $owner) { id authorNotes content @@ -221,15 +221,15 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } func testOnUpdateSubscriptionGraphQLRequest() throws { - let modelType = Blog.self as Model.Type + let modelType = Article.self as Model.Type var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelType: modelType, operationType: .subscription) documentBuilder.add(decorator: DirectiveNameDecorator(type: .onUpdate)) documentBuilder.add(decorator: ConflictResolutionDecorator()) documentBuilder.add(decorator: AuthRuleDecorator(.subscription(.onUpdate, "111"))) let document = documentBuilder.build() let documentStringValue = """ - subscription OnUpdateBlog { - onUpdateBlog { + subscription OnUpdateArticle { + onUpdateArticle { id authorNotes content @@ -253,15 +253,15 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } func testOnDeleteSubscriptionGraphQLRequest() throws { - let modelType = Blog.self as Model.Type + let modelType = Article.self as Model.Type var documentBuilder = ModelBasedGraphQLDocumentBuilder(modelType: modelType, operationType: .subscription) documentBuilder.add(decorator: DirectiveNameDecorator(type: .onDelete)) documentBuilder.add(decorator: ConflictResolutionDecorator()) documentBuilder.add(decorator: AuthRuleDecorator(.subscription(.onDelete, "111"))) let document = documentBuilder.build() let documentStringValue = """ - subscription OnDeleteBlog { - onDeleteBlog { + subscription OnDeleteArticle { + onDeleteArticle { id authorNotes content @@ -285,7 +285,7 @@ class GraphQLRequestAuthRuleTests: XCTestCase { } func testSyncQueryGraphQLRequest() throws { - let modelType = Blog.self as Model.Type + let modelType = Article.self as Model.Type let nextToken = "nextToken" let limit = 100 let lastSync = 123 @@ -296,8 +296,8 @@ class GraphQLRequestAuthRuleTests: XCTestCase { documentBuilder.add(decorator: AuthRuleDecorator(.query)) let document = documentBuilder.build() let documentStringValue = """ - query SyncBlogs($lastSync: AWSTimestamp, $limit: Int, $nextToken: String) { - syncBlogs(lastSync: $lastSync, limit: $limit, nextToken: $nextToken) { + query SyncArticles($lastSync: AWSTimestamp, $limit: Int, $nextToken: String) { + syncArticles(lastSync: $lastSync, limit: $limit, nextToken: $nextToken) { items { id authorNotes diff --git a/AmplifyTestCommon/Models/Blog+Schema.swift b/AmplifyTestCommon/Models/Article+Schema.swift similarity index 72% rename from AmplifyTestCommon/Models/Blog+Schema.swift rename to AmplifyTestCommon/Models/Article+Schema.swift index b99a656fbd..93e4802b81 100644 --- a/AmplifyTestCommon/Models/Blog+Schema.swift +++ b/AmplifyTestCommon/Models/Article+Schema.swift @@ -9,7 +9,7 @@ import Amplify import Foundation -extension Blog { +extension Article { // MARK: - CodingKeys public enum CodingKeys: String, ModelKey { case id @@ -23,9 +23,9 @@ extension Blog { // MARK: - ModelSchema public static let schema = defineSchema { model in - let blog = Blog.keys + let article = Article.keys - model.pluralName = "Blogs" + model.pluralName = "Articles" model.authRules = [ rule(allow: .owner, ownerField: "owner", operations: [.create, .read]), @@ -34,10 +34,10 @@ extension Blog { model.fields( .id(), - .field(blog.content, is: .required, ofType: .string), - .field(blog.createdAt, is: .required, ofType: .dateTime), - .field(blog.owner, is: .optional, ofType: .string), - .field(blog.authorNotes, + .field(article.content, is: .required, ofType: .string), + .field(article.createdAt, is: .required, ofType: .dateTime), + .field(article.owner, is: .optional, ofType: .string), + .field(article.authorNotes, is: .optional, ofType: .string, authRules: [rule(allow: .owner, ownerField: "owner", operations: [.update])] diff --git a/AmplifyTestCommon/Models/Blog.swift b/AmplifyTestCommon/Models/Article.swift similarity index 95% rename from AmplifyTestCommon/Models/Blog.swift rename to AmplifyTestCommon/Models/Article.swift index fb600a2c1e..8f15b96e66 100644 --- a/AmplifyTestCommon/Models/Blog.swift +++ b/AmplifyTestCommon/Models/Article.swift @@ -9,7 +9,7 @@ import Amplify import Foundation -public struct Blog: Model { +public struct Article: Model { public let id: String public var content: String public var createdAt: Temporal.DateTime diff --git a/AmplifyTestCommon/Models/schema.graphql b/AmplifyTestCommon/Models/schema.graphql index bb80e71aad..13a0ea571f 100644 --- a/AmplifyTestCommon/Models/schema.graphql +++ b/AmplifyTestCommon/Models/schema.graphql @@ -23,7 +23,7 @@ type Comment @model { post: Post! @connection(name: "PostComment") } -type Blog +type Article @model @auth(rules: [ { allow: owner, ownerField: "owner", operations: [create, read] },