-
Add new custom schema to
schema.graphqlfile -
Create custom request/response mapping resolvers file in
resolversfolder. The file should look like this:- REQUEST_MAPPING:
Mutation.putUser.req.vtl - RESPONSE_MAPPING:
Mutation.putUser.res.vtl
- REQUEST_MAPPING:
-
Update
CustomResources.jsonfile instackfolder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>destination</key> | |
| <string>upload</string> | |
| <key>method</key> | |
| <string>app-store</string> | |
| <key>provisioningProfiles</key> | |
| <dict> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| BEFORE = ["id": 1, "sergio": ["yume": ["ssk": 999]], "product": ["name": "AAA", "description": ["banana": "yellow"]]] | |
| AFTER = ["sergio/yume/ssk": 999, "id": 1, "product/name": "AAA", "product/description/banana": "yellow"] | |
| */ | |
| typealias JSON = [String : Any] | |
| let nested: JSON = ["id": 1, "product": ["name": "AAA", "description": ["banana": "yellow"]], "sergio": ["yume": ["ssk": 999]]] | |
| extension JSON where Key: ExpressibleByStringLiteral, Value: Any { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## REQUEST MAPPING | |
| { | |
| "version" : "2017-02-28", | |
| "operation" : "Query", | |
| "index": "shopID-vendorID-index", | |
| "query" : { | |
| "expression": "shopID = :shopID AND vendorID = :vendorID", | |
| "expressionValues" : { | |
| ":shopID" : $util.dynamodb.toDynamoDBJson($ctx.args.shopID), | |
| ":vendorID" : $util.dynamodb.toDynamoDBJson($ctx.args.vendorID) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version" : "2017-02-28", | |
| "operation" : "PutItem", | |
| "key" : { | |
| "shopID" : $util.dynamodb.toDynamoDBJson($ctx.args.shopID), | |
| "id": $util.dynamodb.toDynamoDBJson($ctx.args.id) | |
| }, | |
| "attributeValues" : { | |
| "staffName" : $util.dynamodb.toDynamoDBJson($ctx.args.staffName), | |
| "modifiedDate": $util.dynamodb.toDynamoDBJson($ctx.args.modifiedDate), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version" : "2017-02-28", | |
| "operation" : "Query", | |
| "query" : { | |
| "expression" : "author = :author", | |
| "expressionValues" : { | |
| ":author" : $util.dynamodb.toDynamoDBJson($ctx.args.author) | |
| } | |
| }, | |
| ## false -> DESC ORDER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version" : "2017-02-28", | |
| "operation" : "PutItem", | |
| "key" : { | |
| "shopID": $util.dynamodb.toDynamoDBJson($ctx.args.shopID), | |
| "vendorID": $util.dynamodb.toDynamoDBJson($ctx.args.vendorID) | |
| }, | |
| "attributeValues": { | |
| "name": $util.dynamodb.toDynamoDBJson($ctx.args.name) | |
| }, |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Display ToolTip View | |
| /// | |
| /// Example: | |
| /// ```swift | |
| /// let paragraph = NSMutableParagraphStyle() | |
| /// paragraph.lineSpacing = 18 | |
| /// let attributes = [ | |
| /// NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16), | |
| /// NSAttributedString.Key.foregroundColor : UIColor.white, | |
| /// NSAttributedString.Key.paragraphStyle : paragraph |