From 62cb4f5dcbdb5de9de5326d624e67b6edfbca770 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Fri, 13 Sep 2024 18:52:05 -0500 Subject: [PATCH] update rules --- .../Core/AppSyncListProvider.swift | 3 +-- .../Core/AppSyncModelMetadata.swift | 3 +-- .../IAMAuthInterceptor.swift | 3 +-- .../GraphQLScalarTests.swift | 12 ++++-------- .../GraphQLSyncCustomPrimaryKeyTests.swift | 15 +++++---------- .../Gen2_41/GraphQLPostPerson41Tests.swift | 3 +-- .../Gen2_4/GraphQLCartCustomer4Tests.swift | 3 +-- .../GraphQLLazyLoadUserPostCommentTests.swift | 9 +++------ .../LL4/GraphQLLazyLoadPostTagTests.swift | 9 +++------ .../LL5/GraphQLLazyLoadProjectTeam1Tests.swift | 6 ++---- .../LL6/GraphQLLazyLoadProjectTeam2Tests.swift | 3 +-- .../LL8/GraphQLLazyLoadProjectTeam5Tests.swift | 6 ++---- .../LL9/GraphQLLazyLoadProjectTeam6Tests.swift | 3 +-- .../Core/AppSyncListPayloadTests.swift | 3 +-- .../Core/AppSyncListProviderTests.swift | 15 +++++---------- .../Core/AppSyncModelMetadataTests.swift | 18 ++++++------------ .../Utils/GraphQLRequestToListQueryTests.swift | 6 ++---- 17 files changed, 40 insertions(+), 80 deletions(-) diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift index 50aad894b3..26b1ebdbf6 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift @@ -176,8 +176,7 @@ public class AppSyncListProvider: ModelListProvider { graphQLData: graphQLData, apiName: apiName, authMode: authMode - ) - else { + ) else { throw CoreError.listOperation(""" The AppSync response return successfully, but could not decode to AWSAppSyncListResponse from: \(graphQLData) diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelMetadata.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelMetadata.swift index ad7e7d5440..73fd5c5291 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelMetadata.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelMetadata.swift @@ -18,8 +18,7 @@ public enum AppSyncModelMetadataUtils { static func shouldAddMetadata(toModel graphQLData: JSONValue) -> Bool { guard case let .object(modelJSON) = graphQLData, case let .string(modelName) = modelJSON["__typename"], - ModelRegistry.modelSchema(from: modelName) != nil - else { + ModelRegistry.modelSchema(from: modelName) != nil else { return false } diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift index af4c437d10..617e7b5f6e 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift @@ -56,8 +56,7 @@ class IAMAuthInterceptor { signingName: "appsync", signingRegion: region, date: Date() - ) - else { + ) else { Amplify.Logging.error("Unable to sign request") return nil } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLScalarTests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLScalarTests.swift index 3584326eae..3d8c8609be 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLScalarTests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLScalarTests.swift @@ -65,8 +65,7 @@ class GraphQLScalarTests: GraphQLTestBase { XCTAssertEqual(updatedModel, updatedContainer) guard let queriedModel = - try await queryModel(request: .get(ScalarContainer.self, byId: container.id)) - else { + try await queryModel(request: .get(ScalarContainer.self, byId: container.id)) else { XCTFail("Failed to query model") return } @@ -146,8 +145,7 @@ class GraphQLScalarTests: GraphQLTestBase { guard let queriedModel = try await queryModel(request: .get( ListStringContainer.self, byId: container.id - )) - else { + )) else { XCTFail("Failed to query model") return } @@ -188,8 +186,7 @@ class GraphQLScalarTests: GraphQLTestBase { guard let queriedModel = try await queryModel(request: .get( ListStringContainer.self, byId: container.id - )) - else { + )) else { XCTFail("Failed to query model") return } @@ -268,8 +265,7 @@ class GraphQLScalarTests: GraphQLTestBase { guard let queriedModel = try await queryModel(request: .get( NestedTypeTestModel.self, byId: container.id - )) - else { + )) else { XCTFail("Failed to query model") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLSyncBased/GraphQLSyncCustomPrimaryKeyTests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLSyncBased/GraphQLSyncCustomPrimaryKeyTests.swift index d2d833ba8b..6b4142aadf 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLSyncBased/GraphQLSyncCustomPrimaryKeyTests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/GraphQLSyncBased/GraphQLSyncCustomPrimaryKeyTests.swift @@ -49,8 +49,7 @@ class GraphQLSyncCustomPrimaryKeyTests: XCTestCase { /// Create order let customerOrder = CustomerOrder(orderId: UUID().uuidString, email: "test@abc.com") guard let createMutationSyncResult = createCustomerOrder(customerOrder: customerOrder), - let createdCustomerOrder = createMutationSyncResult.model.instance as? CustomerOrder - else { + let createdCustomerOrder = createMutationSyncResult.model.instance as? CustomerOrder else { XCTFail("Failed to create customer order") return } @@ -61,8 +60,7 @@ class GraphQLSyncCustomPrimaryKeyTests: XCTestCase { byId: createdCustomerOrder.id, orderId: createdCustomerOrder.orderId ), - var queriedCustomerOrder = queryMutationSyncResult.model.instance as? CustomerOrder - else { + var queriedCustomerOrder = queryMutationSyncResult.model.instance as? CustomerOrder else { XCTFail("Failed to query customer order") return } @@ -76,8 +74,7 @@ class GraphQLSyncCustomPrimaryKeyTests: XCTestCase { modelSchema: queriedCustomerOrder.schema, version: queryMutationSyncResult.syncMetadata.version ), - let updatedCustomerOrder = updateMutationSyncResult.model.instance as? CustomerOrder - else { + let updatedCustomerOrder = updateMutationSyncResult.model.instance as? CustomerOrder else { XCTFail("Failed to update customer order") return } @@ -90,8 +87,7 @@ class GraphQLSyncCustomPrimaryKeyTests: XCTestCase { modelSchema: updatedCustomerOrder.schema, version: updateMutationSyncResult.syncMetadata.version ), - let deletedCustomerOrder = deleteMutationSyncResult.model.instance as? CustomerOrder - else { + let deletedCustomerOrder = deleteMutationSyncResult.model.instance as? CustomerOrder else { XCTFail("Failed to update customer order") return } @@ -104,8 +100,7 @@ class GraphQLSyncCustomPrimaryKeyTests: XCTestCase { byId: deletedCustomerOrder.id, orderId: deletedCustomerOrder.orderId ), - let queryDeletedCustomerOrder = queryAfterDeleteMutationSyncResult.model.instance as? CustomerOrder - else { + let queryDeletedCustomerOrder = queryAfterDeleteMutationSyncResult.model.instance as? CustomerOrder else { XCTFail("Failed to query customer order") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/Gen2_41/GraphQLPostPerson41Tests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/Gen2_41/GraphQLPostPerson41Tests.swift index 7a780ba823..c24ba889ea 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/Gen2_41/GraphQLPostPerson41Tests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/Gen2_41/GraphQLPostPerson41Tests.swift @@ -34,8 +34,7 @@ final class GraphQLPostPerson41Tests: AWSAPIPluginGen2GraphQLBaseTest { request: .get( Post.self, byIdentifier: post.identifier - )).get() - else { + )).get() else { print("Missing post") // Code Snippet Ends XCTFail("Missing post") diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/GraphQLCartCustomer4Tests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/GraphQLCartCustomer4Tests.swift index d777e0069b..34eb637591 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/GraphQLCartCustomer4Tests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGen2GraphQLTests/Gen2_4/GraphQLCartCustomer4Tests.swift @@ -118,8 +118,7 @@ final class GraphQLCartCustomer4Tests: AWSAPIPluginGen2GraphQLBaseTest { request: .get( Cart.self, byIdentifier: existingCart.identifier - )).get() - else { + )).get() else { print("Missing cart") // Code Snippet Ends XCTFail("Missing cart") diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL14/GraphQLLazyLoadUserPostCommentTests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL14/GraphQLLazyLoadUserPostCommentTests.swift index ecf89b8a5d..b40bcb66ff 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL14/GraphQLLazyLoadUserPostCommentTests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL14/GraphQLLazyLoadUserPostCommentTests.swift @@ -128,8 +128,7 @@ final class GraphQLLazyLoadUserPostCommentTests: GraphQLLazyLoadBaseTest { user.comments, user.posts ] } - )) - else { + )) else { XCTFail("Could not perform nested query for User") return } @@ -154,8 +153,7 @@ final class GraphQLLazyLoadUserPostCommentTests: GraphQLLazyLoadBaseTest { Post.self, byIdentifier: post.id, includes: { post in [post.author, post.comments] } - )) - else { + )) else { XCTFail("Could not perform nested query for Post") return } @@ -173,8 +171,7 @@ final class GraphQLLazyLoadUserPostCommentTests: GraphQLLazyLoadBaseTest { Comment.self, byIdentifier: comment.id, includes: { comment in [comment.author, comment.post] } - )) - else { + )) else { XCTFail("Could not perform nested query for Comment") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL4/GraphQLLazyLoadPostTagTests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL4/GraphQLLazyLoadPostTagTests.swift index 7214987693..c0353c5e7c 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL4/GraphQLLazyLoadPostTagTests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL4/GraphQLLazyLoadPostTagTests.swift @@ -123,8 +123,7 @@ final class GraphQLLazyLoadPostTagTests: GraphQLLazyLoadBaseTest { title: post.title ), includes: { post in [post.tags] } - )) - else { + )) else { XCTFail("Could not perform nested query for Post") return } @@ -144,8 +143,7 @@ final class GraphQLLazyLoadPostTagTests: GraphQLLazyLoadBaseTest { name: tag.name ), includes: { tag in [tag.posts] } - )) - else { + )) else { XCTFail("Could not perform nested query for Tag") return } @@ -165,8 +163,7 @@ final class GraphQLLazyLoadPostTagTests: GraphQLLazyLoadBaseTest { postTag.postWithTagsCompositeKey, postTag.tagWithCompositeKey ] } - )) - else { + )) else { XCTFail("Could not perform nested query for PostTag") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL5/GraphQLLazyLoadProjectTeam1Tests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL5/GraphQLLazyLoadProjectTeam1Tests.swift index 60f7ff1b3f..59d1b586f9 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL5/GraphQLLazyLoadProjectTeam1Tests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL5/GraphQLLazyLoadProjectTeam1Tests.swift @@ -139,8 +139,7 @@ class GraphQLLazyLoadProjectTeam1Tests: GraphQLLazyLoadBaseTest { name: team.name ), includes: { team in [team.project]} - )) - else { + )) else { XCTFail("Could not perform nested query for Team") return } @@ -154,8 +153,7 @@ class GraphQLLazyLoadProjectTeam1Tests: GraphQLLazyLoadBaseTest { name: project.name ), includes: { project in [project.team]} - )) - else { + )) else { XCTFail("Could not perform nested query for Project") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL6/GraphQLLazyLoadProjectTeam2Tests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL6/GraphQLLazyLoadProjectTeam2Tests.swift index b2938944e6..92c62a47bb 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL6/GraphQLLazyLoadProjectTeam2Tests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL6/GraphQLLazyLoadProjectTeam2Tests.swift @@ -103,8 +103,7 @@ class GraphQLLazyLoadProjectTeam2Tests: GraphQLLazyLoadBaseTest { name: project.name ), includes: { project in [project.team]} - )) - else { + )) else { XCTFail("Could not perform nested query for Project") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL8/GraphQLLazyLoadProjectTeam5Tests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL8/GraphQLLazyLoadProjectTeam5Tests.swift index a2fef23b60..d6f81a79d7 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL8/GraphQLLazyLoadProjectTeam5Tests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL8/GraphQLLazyLoadProjectTeam5Tests.swift @@ -106,8 +106,7 @@ class GraphQLLazyLoadProjectTeam5Tests: GraphQLLazyLoadBaseTest { name: team.name ), includes: { team in [team.project]} - )) - else { + )) else { XCTFail("Could not perform nested query for Team") return } @@ -121,8 +120,7 @@ class GraphQLLazyLoadProjectTeam5Tests: GraphQLLazyLoadBaseTest { name: project.name ), includes: { project in [project.team]} - )) - else { + )) else { XCTFail("Could not perform nested query for Project") return } diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL9/GraphQLLazyLoadProjectTeam6Tests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL9/GraphQLLazyLoadProjectTeam6Tests.swift index 7b09642ccb..a047e1adf6 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL9/GraphQLLazyLoadProjectTeam6Tests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginLazyLoadTests/LL9/GraphQLLazyLoadProjectTeam6Tests.swift @@ -98,8 +98,7 @@ class GraphQLLazyLoadProjectTeam6Tests: GraphQLLazyLoadBaseTest { name: project.name ), includes: { project in [project.team]} - )) - else { + )) else { XCTFail("Could not perform nested query for Project") return } diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListPayloadTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListPayloadTests.swift index efc361a5e9..bfc2784d3d 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListPayloadTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListPayloadTests.swift @@ -37,8 +37,7 @@ class AppSyncListPayloadTests: XCTestCase { return } guard let postFilter = filter["postID"] as? [String: String], - let postId = postFilter["eq"] - else { + let postId = postFilter["eq"] else { XCTFail("Could not retrieve filter values") return } diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderTests.swift index 1a85f2039f..4f06001535 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderTests.swift @@ -177,8 +177,7 @@ class AppSyncListProviderTests: XCTestCase { XCTAssertEqual(nextToken, "nextToken") guard let filter = filterOptional, let postFilter = filter["postID"] as? [String: String], - let postId = postFilter["eq"] - else { + let postId = postFilter["eq"] else { XCTFail("Could not retrieve filter values") return } @@ -207,8 +206,7 @@ class AppSyncListProviderTests: XCTestCase { XCTFail("Should have failed") } catch let coreError as CoreError { guard case .listOperation(_, _, let underlyingError) = coreError, - (underlyingError as? APIError) != nil - else { + (underlyingError as? APIError) != nil else { XCTFail("Unexpected error \(coreError)") return } @@ -266,8 +264,7 @@ class AppSyncListProviderTests: XCTestCase { XCTAssertEqual(nextToken, "nextToken") guard let filter = filterOptional, let postFilter = filter["postID"] as? [String: String], - let postId = postFilter["eq"] - else { + let postId = postFilter["eq"] else { XCTFail("Could not retrieve filter values") return } @@ -296,8 +293,7 @@ class AppSyncListProviderTests: XCTestCase { XCTFail("Should have failed") } catch let error as CoreError { guard case .listOperation(_, _, let underlyingError) = error, - (underlyingError as? APIError) != nil - else { + (underlyingError as? APIError) != nil else { XCTFail("Unexpected error \(error)") return } @@ -334,8 +330,7 @@ class AppSyncListProviderTests: XCTestCase { XCTFail("Should have failed") } catch let error as CoreError { guard case .listOperation(_, _, let underlyingError) = error, - (underlyingError as? GraphQLResponseError) != nil - else { + (underlyingError as? GraphQLResponseError) != nil else { XCTFail("Unexpected error \(error)") return } diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncModelMetadataTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncModelMetadataTests.swift index 7b43d43643..ac8ec972d9 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncModelMetadataTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncModelMetadataTests.swift @@ -65,8 +65,7 @@ class ModelMetadataTests: XCTestCase { case .array(let associatedFields) = associationData["appSyncAssociatedFields"], case .array(let associatedIdentifiers) = associationData["appSyncAssociatedIdentifiers"], case .string(let apiName) = associationData["apiName"], - case .string(let authMode) = associationData["authMode"] - else { + case .string(let authMode) = associationData["authMode"] else { XCTFail("Missing association metadata for comments") return } @@ -89,8 +88,7 @@ class ModelMetadataTests: XCTestCase { case .array(let associatedFields) = associationData["appSyncAssociatedFields"], case .array(let associatedIdentifiers) = associationData["appSyncAssociatedIdentifiers"], case .string(let apiName) = associationData["apiName"], - case .string(let authMode) = associationData["authMode"] - else { + case .string(let authMode) = associationData["authMode"] else { XCTFail("Missing association metadata for comments") return } @@ -115,8 +113,7 @@ class ModelMetadataTests: XCTestCase { let post = AppSyncModelMetadataUtils.addMetadata(toModel: json, apiName: "apiName", authMode: nil) guard case .object(let postObject) = post, case .string = postObject["id"], - case .string = postObject["title"] - else { + case .string = postObject["title"] else { XCTFail("Should have exactly the number of fields in original json object") return } @@ -134,8 +131,7 @@ class ModelMetadataTests: XCTestCase { guard case .object(let postObject) = post, case .string = postObject["id"], case .string = postObject["title"], - case .string = postObject["__typename"] - else { + case .string = postObject["__typename"] else { XCTFail("Should have exactly the number of fields in original json object") return } @@ -151,8 +147,7 @@ class ModelMetadataTests: XCTestCase { let post = AppSyncModelMetadataUtils.addMetadata(toModel: json, apiName: "apiName", authMode: nil) guard case .object(let postObject) = post, case .string = postObject["title"], - case .string = postObject["__typename"] - else { + case .string = postObject["__typename"] else { XCTFail("Should have exactly the number of fields in original json object") return } @@ -176,8 +171,7 @@ class ModelMetadataTests: XCTestCase { guard case .object(let associationData) = post["comments"], associationData["appSyncAssociatedField"] == nil, associationData["appSyncAssociatedIdentifiers"] == nil, - associationData["apiName"] == nil - else { + associationData["apiName"] == nil else { XCTFail("Nested levels of data should not have metadata added") return } diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/GraphQLRequestToListQueryTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/GraphQLRequestToListQueryTests.swift index 84d61516de..27b72d97ee 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/GraphQLRequestToListQueryTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/GraphQLRequestToListQueryTests.swift @@ -64,8 +64,7 @@ class GraphQLRequestToListQueryTests: XCTestCase { let filterJSON = try? JSONSerialization.data( withJSONObject: filter, options: .prettyPrinted - ) - else { + ) else { XCTFail("variables should contain a valid filter JSON") return } @@ -169,8 +168,7 @@ class GraphQLRequestToListQueryTests: XCTestCase { let filterJSON = try? JSONSerialization.data( withJSONObject: filter, options: .prettyPrinted - ) - else { + ) else { XCTFail("variables should contain a valid filter JSON") return }