@aws-amplify/data-schema 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/data-schema",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -79,11 +79,15 @@ type ReturnValue<
79
79
  * This mapped type traverses the SelectionSetReturnValue result and the original FlatModel, restoring array types
80
80
  * that were flattened in DeepPickFromPath
81
81
  *
82
+ * Note: custom type field arrays are already handled correctly and don't need to be "restored", hence the `Result[K] extends Array<any>` check
83
+ *
82
84
  */
83
85
  type RestoreArrays<Result, FlatModel> = {
84
86
  [K in keyof Result]: K extends keyof FlatModel
85
87
  ? FlatModel[K] extends Array<any>
86
- ? Array<RestoreArrays<Result[K], UnwrapArray<FlatModel[K]>>>
88
+ ? Result[K] extends Array<any>
89
+ ? Result[K]
90
+ : Array<RestoreArrays<Result[K], UnwrapArray<FlatModel[K]>>>
87
91
  : FlatModel[K] extends Record<string, any>
88
92
  ? RestoreArrays<Result[K], FlatModel[K]>
89
93
  : Result[K]
@@ -46,7 +46,7 @@ const skGraphQlFieldTypeMap = {
46
46
  AWSDate: 'String',
47
47
  AWSTime: 'String',
48
48
  AWSDateTime: 'String',
49
- AWSTimestamp: 'String',
49
+ AWSTimestamp: 'Int',
50
50
  AWSEmail: 'String',
51
51
  AWSPhone: 'String',
52
52
  AWSURL: 'String',