

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# AWS AppSync 解析程式映射範本公用程式參考
<a name="resolver-util-reference"></a>

**注意**  
我們現在主要支援 APPSYNC\_JS 執行期及其文件。請考慮[在此處](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-reference-js-version.html)使用 APPSYNC\_JS 執行期及其指南。

AWS AppSync 定義一組公用程式，您可以在 GraphQL 解析程式中用來簡化與資料來源的互動。其中一些公用程式用於任何資料來源的一般用途，例如產生 IDs 或時間戳記。其他則是特定於一種資料來源類型。下列公用程式可供使用：
+  [ $util 中的公用程式協助程式 ](https://docs.aws.amazon.com/appsync/latest/devguide/utility-helpers-in-util.html) - $util 變數包含一般公用程式方法，可協助您處理資料。除非另行指定，否則所有公用程式皆使用 UTF-8 字元集。
+ [ AppSync 指令](https://docs.aws.amazon.com/appsync/latest/devguide/aws-appsync-directives.html) - AppSync 公開指令，以促進開發人員在 VTL 中寫入時的生產力。
+  [ $util.time 中的時間協助程式 ](https://docs.aws.amazon.com/appsync/latest/devguide/time-helpers-in-util-time.html) - $util.time 變數包含日期時間方法，可協助產生時間戳記、在日期時間格式之間轉換，以及剖析日期時間字串。日期時間格式的語法是以 [DateTimeFormatter](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html) 為基礎，您可以參考以取得進一步的文件。
+ 在[ $util.list 中列出協助程式 ](https://docs.aws.amazon.com/appsync/latest/devguide/list-helpers-in-util-list.html) - $util.list 包含有助於常見清單操作的方法，例如從清單中移除或保留項目以篩選使用案例。
+  [ $util.map - $util.map 中的映射協助程式](https://docs.aws.amazon.com/appsync/latest/devguide/utility-helpers-in-map.html)包含有助於常見映射操作的方法，例如從映射中移除或保留項目以篩選使用案例。
+  [ $util.dynamodb - $util.dynamodb 中的 DynamoDB 協助程式](https://docs.aws.amazon.com/appsync/latest/devguide/dynamodb-helpers-in-util-dynamodb.html)包含協助程式方法，可讓您更輕鬆地將資料寫入和讀取至 Amazon DynamoDB，例如自動類型映射和格式化。
+  [ $util.rds - $util.rds 中的 Amazon RDS 協助程式](https://docs.aws.amazon.com/appsync/latest/devguide/rds-helpers-in-util-rds.html)包含協助程式方法，可透過消除結果輸出中的外部資料來格式化 RDS 操作。
+  [ $util.http 中的 HTTP 協助程式 ](https://docs.aws.amazon.com/appsync/latest/devguide/http-helpers-in-utils-http.html) - $util.http 公用程式提供可用於管理 HTTP 請求參數和新增回應標頭的協助程式方法。
+  [ $util.xml - $util.xml 中的 XML 協助程式](https://docs.aws.amazon.com/appsync/latest/devguide/xml-helpers-in-utils-xml.html)包含協助程式方法，可讓您更輕鬆地將 XML 回應轉譯為 JSON 或字典。
+  [ $util.transform 中的轉換協助程式 ](https://docs.aws.amazon.com/appsync/latest/devguide/transformation-helpers-in-utils-transform.html) - $util.transform 包含協助程式方法，可讓您更輕鬆地對資料來源執行複雜的操作，例如 DynamoDB 篩選操作。
+  [ $util.math - $util.math 中的數學協助程式](https://docs.aws.amazon.com/appsync/latest/devguide/math-helpers-in-util-math.html)包含有助於常見數學操作的方法。
+  [ $util.str 中的字串協助程式 ](https://docs.aws.amazon.com/appsync/latest/devguide/str-helpers-in-util-str.html) - $util.str 包含有助於常見字串操作的方法。
+  [ 延伸 ](https://docs.aws.amazon.com/appsync/latest/devguide/extensions.html)- $extensions 包含一組方法，可在解析程式中執行其他動作。