@aws-amplify/graphql-api-construct 1.8.0-z-data-schema-generator.0 → 1.9.0-0411-gen2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. package/.jsii +313 -200
  2. package/API.md +16 -3
  3. package/CHANGELOG.md +12 -2
  4. package/lib/amplify-dynamodb-table-wrapper.js +1 -1
  5. package/lib/amplify-graphql-api.js +3 -2
  6. package/lib/amplify-graphql-definition.js +1 -1
  7. package/lib/index.d.ts +1 -1
  8. package/lib/index.js +1 -1
  9. package/lib/internal/authorization-modes.d.ts +12 -1
  10. package/lib/internal/authorization-modes.js +47 -7
  11. package/lib/internal/codegen-assets.js +10 -1
  12. package/lib/sql-model-datasource-strategy.js +1 -1
  13. package/lib/types.d.ts +51 -5
  14. package/lib/types.js +1 -1
  15. package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +3 -1
  16. package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +8 -1
  17. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
  18. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +34 -22
  19. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
  20. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.d.ts.map +1 -1
  21. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js +1 -0
  22. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/constants.js.map +1 -1
  23. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts +2 -1
  24. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts.map +1 -1
  25. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js.map +1 -1
  26. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts +2 -1
  27. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts.map +1 -1
  28. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js +22 -11
  29. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js.map +1 -1
  30. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.d.ts.map +1 -1
  31. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js +11 -4
  32. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js.map +1 -1
  33. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts +1 -0
  34. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.d.ts.map +1 -1
  35. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js +10 -1
  36. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/warnings.js.map +1 -1
  37. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.d.ts +4 -0
  38. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.d.ts.map +1 -0
  39. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.js +12 -0
  40. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/common.js.map +1 -0
  41. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts +1 -1
  42. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.d.ts.map +1 -1
  43. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js +1 -1
  44. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/ddb-vtl-generator.js.map +1 -1
  45. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts +1 -1
  46. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.d.ts.map +1 -1
  47. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js +20 -10
  48. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/field.js.map +1 -1
  49. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts +9 -2
  50. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.d.ts.map +1 -1
  51. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js +16 -9
  52. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/helpers.js.map +1 -1
  53. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts +1 -1
  54. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.d.ts.map +1 -1
  55. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js +2 -2
  56. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/index.js.map +1 -1
  57. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.d.ts.map +1 -1
  58. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js +5 -4
  59. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.create.js.map +1 -1
  60. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.d.ts.map +1 -1
  61. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js +5 -4
  62. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.delete.js.map +1 -1
  63. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.d.ts.map +1 -1
  64. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js +5 -4
  65. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/mutation.update.js.map +1 -1
  66. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.d.ts.map +1 -1
  67. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js +15 -4
  68. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/query.js.map +1 -1
  69. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.d.ts.map +1 -1
  70. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js +5 -4
  71. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/search.js.map +1 -1
  72. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.d.ts.map +1 -1
  73. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js +8 -2
  74. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/ddb/resolvers/subscriptions.js.map +1 -1
  75. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts +1 -1
  76. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.d.ts.map +1 -1
  77. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js +2 -2
  78. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/rds-vtl-generator.js.map +1 -1
  79. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts +3 -2
  80. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.d.ts.map +1 -1
  81. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js +27 -16
  82. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/common.js.map +1 -1
  83. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.d.ts.map +1 -1
  84. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js +5 -5
  85. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/mutation.js.map +1 -1
  86. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js +3 -3
  87. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/query.js.map +1 -1
  88. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js +1 -1
  89. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/rds/resolvers/subscription.js.map +1 -1
  90. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts +1 -1
  91. package/node_modules/@aws-amplify/graphql-auth-transformer/lib/vtl-generator/vtl-generator.d.ts.map +1 -1
  92. package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +13 -13
  93. package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +5 -1
  94. package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +8 -8
  95. package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +6 -0
  96. package/node_modules/@aws-amplify/graphql-directives/LICENSE +201 -0
  97. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.d.ts.map +1 -1
  98. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js +1 -0
  99. package/node_modules/@aws-amplify/graphql-directives/lib/directives/auth.js.map +1 -1
  100. package/node_modules/@aws-amplify/graphql-directives/package.json +3 -2
  101. package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +5 -1
  102. package/node_modules/@aws-amplify/graphql-function-transformer/package.json +7 -7
  103. package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +5 -1
  104. package/node_modules/@aws-amplify/graphql-http-transformer/package.json +7 -7
  105. package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +7 -1
  106. package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts +1 -1
  107. package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.d.ts.map +1 -1
  108. package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js +19 -10
  109. package/node_modules/@aws-amplify/graphql-index-transformer/lib/resolvers/resolvers.js.map +1 -1
  110. package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.d.ts.map +1 -1
  111. package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.js +13 -2
  112. package/node_modules/@aws-amplify/graphql-index-transformer/lib/schema.js.map +1 -1
  113. package/node_modules/@aws-amplify/graphql-index-transformer/package.json +8 -8
  114. package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +5 -1
  115. package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
  116. package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +11 -11
  117. package/node_modules/@aws-amplify/graphql-model-transformer/API.md +3 -3
  118. package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +12 -1
  119. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts +1 -0
  120. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.d.ts.map +1 -1
  121. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js +2 -1
  122. package/node_modules/@aws-amplify/graphql-model-transformer/lib/definitions.js.map +1 -1
  123. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.d.ts.map +1 -1
  124. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js +29 -16
  125. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-model-transformer.js.map +1 -1
  126. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts +1 -1
  127. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.d.ts.map +1 -1
  128. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js +11 -7
  129. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/common.js.map +1 -1
  130. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/mutation.d.ts.map +1 -1
  131. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/mutation.js +8 -6
  132. package/node_modules/@aws-amplify/graphql-model-transformer/lib/graphql-types/mutation.js.map +1 -1
  133. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
  134. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
  135. package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
  136. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts +1 -1
  137. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.d.ts.map +1 -1
  138. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js +18 -9
  139. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resolvers/common.js.map +1 -1
  140. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts +2 -0
  141. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.d.ts.map +1 -1
  142. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js +60 -25
  143. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/amplify-dynamodb-table/amplify-table-manager-lambda/amplify-table-manager-handler.js.map +1 -1
  144. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.d.ts.map +1 -1
  145. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js +3 -3
  146. package/node_modules/@aws-amplify/graphql-model-transformer/lib/resources/model-resource-generator.js.map +1 -1
  147. package/node_modules/@aws-amplify/graphql-model-transformer/package.json +9 -8
  148. package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +5 -1
  149. package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
  150. package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +7 -7
  151. package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +15 -2
  152. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts +3 -4
  153. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.d.ts.map +1 -1
  154. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js +7 -4
  155. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-fields-transformer.js.map +1 -1
  156. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.d.ts +11 -0
  157. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.d.ts.map +1 -0
  158. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.js +35 -0
  159. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-ddb-references-transformer.js.map +1 -0
  160. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts +4 -5
  161. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.d.ts.map +1 -1
  162. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js +8 -5
  163. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-sql-transformer.js.map +1 -1
  164. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts +2 -2
  165. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.d.ts.map +1 -1
  166. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js +19 -4
  167. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/belongs-to/belongs-to-directive-transformer-factory.js.map +1 -1
  168. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts +1 -1
  169. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.d.ts.map +1 -1
  170. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js +6 -7
  171. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-belongs-to-transformer.js.map +1 -1
  172. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts +1 -1
  173. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.d.ts.map +1 -1
  174. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js +6 -9
  175. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-many-transformer.js.map +1 -1
  176. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js +5 -6
  177. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-has-one-transformer.js.map +1 -1
  178. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
  179. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts +2 -3
  180. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.d.ts.map +1 -1
  181. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js +6 -2
  182. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-fields-transformer.js.map +1 -1
  183. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts +11 -0
  184. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.d.ts.map +1 -0
  185. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js +44 -0
  186. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-ddb-references-transformer.js.map +1 -0
  187. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts +4 -5
  188. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.d.ts.map +1 -1
  189. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js +7 -4
  190. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-sql-transformer.js.map +1 -1
  191. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts +1 -1
  192. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.d.ts.map +1 -1
  193. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js +18 -3
  194. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-many/has-many-directive-transformer-factory.js.map +1 -1
  195. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts +3 -4
  196. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.d.ts.map +1 -1
  197. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js +7 -4
  198. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-fields-transformer.js.map +1 -1
  199. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts +11 -0
  200. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.d.ts.map +1 -0
  201. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js +44 -0
  202. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-ddb-references-transformer.js.map +1 -0
  203. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts +4 -5
  204. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.d.ts.map +1 -1
  205. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js +7 -4
  206. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-sql-transformer.js.map +1 -1
  207. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts +1 -1
  208. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.d.ts.map +1 -1
  209. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js +18 -3
  210. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/has-one/has-one-directive-transformer-factory.js.map +1 -1
  211. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts +3 -2
  212. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.d.ts.map +1 -1
  213. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js +20 -5
  214. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-generator.js.map +1 -1
  215. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.d.ts +11 -0
  216. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.d.ts.map +1 -0
  217. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.js +213 -0
  218. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/ddb-references-generator.js.map +1 -0
  219. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts +2 -2
  220. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.d.ts.map +1 -1
  221. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/generator.js.map +1 -1
  222. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts +2 -1
  223. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.d.ts.map +1 -1
  224. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js +20 -5
  225. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolver/rds-generator.js.map +1 -1
  226. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.d.ts +3 -1
  227. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.d.ts.map +1 -1
  228. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.js +142 -17
  229. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/resolvers.js.map +1 -1
  230. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.d.ts +1 -1
  231. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.d.ts.map +1 -1
  232. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/schema.js.map +1 -1
  233. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts +5 -0
  234. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/types.d.ts.map +1 -1
  235. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts +2 -1
  236. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.d.ts.map +1 -1
  237. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js +7 -1
  238. package/node_modules/@aws-amplify/graphql-relational-transformer/lib/utils.js.map +1 -1
  239. package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +9 -9
  240. package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +7 -1
  241. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.d.ts +1 -1
  242. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.d.ts.map +1 -1
  243. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.js +20 -9
  244. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/generate-resolver-vtl.js.map +1 -1
  245. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.d.ts.map +1 -1
  246. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js +14 -3
  247. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/graphql-searchable-transformer.js.map +1 -1
  248. package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
  249. package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +8 -8
  250. package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +7 -1
  251. package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.d.ts.map +1 -1
  252. package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js +17 -8
  253. package/node_modules/@aws-amplify/graphql-sql-transformer/lib/graphql-sql-transformer.js.map +1 -1
  254. package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +8 -8
  255. package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +5 -1
  256. package/node_modules/@aws-amplify/graphql-transformer/package.json +15 -15
  257. package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +5 -1
  258. package/node_modules/@aws-amplify/graphql-transformer-core/package.json +5 -5
  259. package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +2 -1
  260. package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +8 -1
  261. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts +1 -0
  262. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/synth-parameters.d.ts.map +1 -1
  263. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts +1 -1
  264. package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/transformer-context-provider.d.ts.map +1 -1
  265. package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +2 -2
  266. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/synth-parameters.ts +1 -0
  267. package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/transformer-context-provider.ts +1 -0
  268. package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
  269. package/node_modules/graphql-transformer-common/API.md +1 -0
  270. package/node_modules/graphql-transformer-common/CHANGELOG.md +9 -1
  271. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts +1 -0
  272. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.d.ts.map +1 -1
  273. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js +1 -0
  274. package/node_modules/graphql-transformer-common/lib/TypescriptSchemaConstants.js.map +1 -1
  275. package/node_modules/graphql-transformer-common/package.json +2 -2
  276. package/package.json +19 -19
  277. package/src/amplify-graphql-api.ts +2 -0
  278. package/src/index.ts +1 -0
  279. package/src/internal/authorization-modes.ts +57 -8
  280. package/src/internal/codegen-assets.ts +11 -2
  281. package/src/types.ts +56 -5
@@ -3,13 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getHasOneDirectiveTransformer = void 0;
4
4
  const has_one_directive_ddb_fields_transformer_1 = require("./has-one-directive-ddb-fields-transformer");
5
5
  const has_one_directive_sql_transformer_1 = require("./has-one-directive-sql-transformer");
6
- const getHasOneDirectiveTransformer = (dbType) => {
6
+ const has_one_directive_ddb_references_transformer_1 = require("./has-one-directive-ddb-references-transformer");
7
+ const hasOneDirectiveMySqlTransformer = new has_one_directive_sql_transformer_1.HasOneDirectiveSQLTransformer();
8
+ const hasOneDirectivePostgresTransformer = new has_one_directive_sql_transformer_1.HasOneDirectiveSQLTransformer();
9
+ const hasOneDirectiveDdbFieldsTransformer = new has_one_directive_ddb_fields_transformer_1.HasOneDirectiveDDBFieldsTransformer();
10
+ const hasOneDirectiveDdbReferencesTransformer = new has_one_directive_ddb_references_transformer_1.HasOneDirectiveDDBReferencesTransformer();
11
+ const getHasOneDirectiveTransformer = (dbType, config) => {
7
12
  switch (dbType) {
8
13
  case 'MYSQL':
14
+ return hasOneDirectiveMySqlTransformer;
9
15
  case 'POSTGRES':
10
- return new has_one_directive_sql_transformer_1.HasOneDirectiveSQLTransformer(dbType);
16
+ return hasOneDirectivePostgresTransformer;
11
17
  case 'DYNAMODB':
12
- return new has_one_directive_ddb_fields_transformer_1.HasOneDirectiveDDBFieldsTransformer(dbType);
18
+ if (config.references) {
19
+ if (config.fields) {
20
+ throw new Error('Something went wrong >> cannot have both references and fields.');
21
+ }
22
+ if (config.references.length < 1) {
23
+ throw new Error(`Invalid @hasMany directive on ${config.field.name.value} - empty references list`);
24
+ }
25
+ return hasOneDirectiveDdbReferencesTransformer;
26
+ }
27
+ return hasOneDirectiveDdbFieldsTransformer;
13
28
  }
14
29
  };
15
30
  exports.getHasOneDirectiveTransformer = getHasOneDirectiveTransformer;
@@ -1 +1 @@
1
- {"version":3,"file":"has-one-directive-transformer-factory.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-transformer-factory.ts"],"names":[],"mappings":";;;AAGA,yGAAiG;AACjG,2FAAoF;AAE7E,MAAM,6BAA6B,GAAG,CAC3C,MAAqC,EAC8B,EAAE;IACrE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO,CAAC;QACb,KAAK,UAAU;YACb,OAAO,IAAI,iEAA6B,CAAC,MAAM,CAAC,CAAC;QACnD,KAAK,UAAU;YACb,OAAO,IAAI,8EAAmC,CAAC,MAAM,CAAC,CAAC;KAC1D;AACH,CAAC,CAAC;AAVW,QAAA,6BAA6B,iCAUxC"}
1
+ {"version":3,"file":"has-one-directive-transformer-factory.js","sourceRoot":"","sources":["../../src/has-one/has-one-directive-transformer-factory.ts"],"names":[],"mappings":";;;AAGA,yGAAiG;AACjG,2FAAoF;AACpF,iHAAyG;AAEzG,MAAM,+BAA+B,GAAG,IAAI,iEAA6B,EAAE,CAAC;AAC5E,MAAM,kCAAkC,GAAG,IAAI,iEAA6B,EAAE,CAAC;AAC/E,MAAM,mCAAmC,GAAG,IAAI,8EAAmC,EAAE,CAAC;AACtF,MAAM,uCAAuC,GAAG,IAAI,sFAAuC,EAAE,CAAC;AAEvF,MAAM,6BAA6B,GAAG,CAC3C,MAAqC,EACrC,MAAoC,EAE+B,EAAE;IACrE,QAAQ,MAAM,EAAE;QACd,KAAK,OAAO;YACV,OAAO,+BAA+B,CAAC;QACzC,KAAK,UAAU;YACb,OAAO,kCAAkC,CAAC;QAC5C,KAAK,UAAU;YAGb,IAAI,MAAM,CAAC,UAAU,EAAE;gBAErB,IAAI,MAAM,CAAC,MAAM,EAAE;oBAEjB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;iBACpF;gBACD,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,0BAA0B,CAAC,CAAC;iBACrG;gBACD,OAAO,uCAAuC,CAAC;aAChD;YAID,OAAO,mCAAmC,CAAC;KAC9C;AACH,CAAC,CAAC;AA7BW,QAAA,6BAA6B,iCA6BxC"}
@@ -6,8 +6,9 @@ import { RelationalResolverGenerator } from './generator';
6
6
  export declare class DDBRelationalResolverGenerator extends RelationalResolverGenerator {
7
7
  makeExpression: (keySchema: any[], connectionAttributes: string[]) => ObjectNode;
8
8
  makeHasManyGetItemsConnectionWithKeyResolver: (config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider) => void;
9
- makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration | BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
9
+ makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
10
+ makeBelongsToGetItemConnectionWithKeyResolver: (config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
11
+ makeHasOneBelongToGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration | BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
10
12
  buildKeyValueExpression: (fieldName: string, object: ObjectTypeDefinitionNode, isPartitionKey?: boolean) => Expression;
11
- makeBelongsToGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
12
13
  }
13
14
  //# sourceMappingURL=ddb-generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ddb-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/ddb-generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAEL,UAAU,EACV,UAAU,EAsBX,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS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AG,+BAA+B,OACjE,0BAA0B,KAC9B,IAAI,CAyHL;IAEF,uBAAuB,cAAe,MAAM,UAAU,wBAAwB,+BAA2B,UAAU,CAWjH;CACH"}
@@ -4,6 +4,7 @@ exports.DDBRelationalResolverGenerator = void 0;
4
4
  const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
5
5
  const graphql_mapping_template_1 = require("graphql-mapping-template");
6
6
  const graphql_transformer_common_1 = require("graphql-transformer-common");
7
+ const graphql_model_transformer_1 = require("@aws-amplify/graphql-model-transformer");
7
8
  const resolvers_1 = require("../resolvers");
8
9
  const generator_1 = require("./generator");
9
10
  const SORT_KEY_VALUE = 'sortKeyValue';
@@ -98,11 +99,23 @@ class DDBRelationalResolverGenerator extends generator_1.RelationalResolverGener
98
99
  (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
99
100
  (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttributes.get("${connectionAttributes[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${connectionAttributes[0]}`))),
100
101
  (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)), (0, graphql_mapping_template_1.compoundExpression)([(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.obj)({ items: (0, graphql_mapping_template_1.list)([]) })), (0, graphql_mapping_template_1.raw)('#return($result)')]), (0, graphql_mapping_template_1.compoundExpression)([...setup, queryObj])),
101
- ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.compoundExpression)([(0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$result'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.ref)('ctx.result'))), (0, graphql_mapping_template_1.raw)('$util.toJson($result)')]))), `${object.name.value}.${field.name.value}.res.vtl`));
102
+ ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.compoundExpression)([
103
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$result'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.ref)('ctx.result'))),
104
+ (0, graphql_mapping_template_1.compoundExpression)([
105
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)()), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('item'), (0, graphql_mapping_template_1.ref)('result.items'), [(0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('item.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))])),
106
+ (0, graphql_mapping_template_1.raw)('$util.toJson($result)'),
107
+ ]),
108
+ ]))), `${object.name.value}.${field.name.value}.res.vtl`));
102
109
  resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
103
110
  ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
104
111
  };
105
112
  this.makeHasOneGetItemConnectionWithKeyResolver = (config, ctx) => {
113
+ this.makeHasOneBelongToGetItemConnectionWithKeyResolver(config, ctx);
114
+ };
115
+ this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
116
+ this.makeHasOneBelongToGetItemConnectionWithKeyResolver(config, ctx);
117
+ };
118
+ this.makeHasOneBelongToGetItemConnectionWithKeyResolver = (config, ctx) => {
106
119
  const { connectionFields, field, fields, object, relatedType, relatedTypeIndex } = config;
107
120
  if (relatedTypeIndex.length === 0) {
108
121
  throw new Error('Expected relatedType index fields to be set for connection.');
@@ -151,7 +164,12 @@ class DDBRelationalResolverGenerator extends generator_1.RelationalResolverGener
151
164
  (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('filter'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), authFilter))))),
152
165
  (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
153
166
  ])),
154
- ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()')), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('ctx.result.items[0]')), (0, graphql_mapping_template_1.compoundExpression)([
167
+ ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()')), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.compoundExpression)([
168
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('resultValue'), (0, graphql_mapping_template_1.ref)('ctx.result.items[0]')),
169
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)())),
170
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('resultValue.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))),
171
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('resultValue')),
172
+ ]), (0, graphql_mapping_template_1.compoundExpression)([
155
173
  (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()'), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.ref)('util.unauthorized()')),
156
174
  (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
157
175
  ])))), `${object.name.value}.${field.name.value}.res.vtl`));
@@ -164,9 +182,6 @@ class DDBRelationalResolverGenerator extends generator_1.RelationalResolverGener
164
182
  const attributeType = field ? (0, graphql_transformer_common_1.attributeTypeFromScalar)(field.type) : 'S';
165
183
  return (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.${attributeType === 'S' ? 'defaultIfNullOrBlank' : 'defaultIfNull'}(${isPartitionKey ? `$${PARTITION_KEY_VALUE}` : `$ctx.source.${fieldName}`}, "${graphql_transformer_common_1.NONE_VALUE}")))`);
166
184
  };
167
- this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
168
- this.makeHasOneGetItemConnectionWithKeyResolver(config, ctx);
169
- };
170
185
  }
171
186
  }
172
187
  exports.DDBRelationalResolverGenerator = DDBRelationalResolverGenerator;
@@ -1 +1 @@
1
- {"version":3,"file":"ddb-generator.js","sourceRoot":"","sources":["../../src/resolver/ddb-generator.ts"],"names":[],"mappings":";;;AAAA,oFAAmI;AAEnI,uEAyBkC;AAClC,2EASoC;AAGpC,4CAAgD;AAChD,2CAA0D;AAE1D,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3C,MAAM,UAAU,GAAG,IAAA,8BAAG,EAAC,sBAAsB,CAAC,CAAC;AAC/C,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD,MAAa,8BAA+B,SAAQ,uCAA2B;IAA/E;;QACE,mBAAc,GAAG,CAAC,SAAgB,EAAE,oBAA8B,EAAc,EAAE;YAChF,IAAI,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D,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU,CACnD,CACF,CAAC;YAEF,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC;YACtF,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAC;QAEF,4BAAuB,GAAG,CAAC,SAAiB,EAAE,MAAgC,EAAE,cAAc,GAAG,KAAK,EAAc,EAAE;;YACpH,MAAM,KAAK,GAAG,MAAA,MAAM,CAAC,MAAM,0CAAE,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;YAGvE,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,IAAA,oDAAuB,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAExE,OAAO,IAAA,8BAAG,EACR,sDAAsD,aAAa,KAAK,GAAG,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,IACpH,cAAc,CAAC,CAAC,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC,CAAC,eAAe,SAAS,EACvE,MAAM,uCAAU,MAAM,CACvB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA;AA/UD,wEA+UC"}
@@ -0,0 +1,11 @@
1
+ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
2
+ import { ObjectNode } from 'graphql-mapping-template';
3
+ import { BelongsToDirectiveConfiguration, HasManyDirectiveConfiguration, HasOneDirectiveConfiguration } from '../types';
4
+ import { DDBRelationalResolverGenerator } from './ddb-generator';
5
+ export declare class DDBRelationalReferencesResolverGenerator extends DDBRelationalResolverGenerator {
6
+ makeQueryExpression: (references: string[]) => ObjectNode;
7
+ makeHasManyGetItemsConnectionWithKeyResolver: (config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider) => void;
8
+ makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider) => void;
9
+ makeBelongsToGetItemConnectionWithKeyResolver: (config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
10
+ }
11
+ //# sourceMappingURL=ddb-references-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ddb-references-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/ddb-references-generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAGL,UAAU,EAuBX,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAOjE,qBAAa,wCAAyC,SAAQ,8BAA8B;IAC1F,mBAAmB,eAAgB,MAAM,EAAE,KAAG,UAAU,CA2BtD;IAOF,4CAA4C,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IAAI,CA8H3H;IAEF,0CAA0C,WAAY,4BAA4B,OAAO,0BAA0B,KAAG,IAAI,CAyHxH;IAOF,6CAA6C,WAAY,+BAA+B,OAAO,0BAA0B,KAAG,IAAI,CAqH9H;CACH"}
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DDBRelationalReferencesResolverGenerator = void 0;
4
+ const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
5
+ const graphql_mapping_template_1 = require("graphql-mapping-template");
6
+ const graphql_transformer_common_1 = require("graphql-transformer-common");
7
+ const graphql_model_transformer_1 = require("@aws-amplify/graphql-model-transformer");
8
+ const resolvers_1 = require("../resolvers");
9
+ const ddb_generator_1 = require("./ddb-generator");
10
+ const SORT_KEY_VALUE = 'sortKeyValue';
11
+ const CONNECTION_STACK = 'ConnectionStack';
12
+ const authFilter = (0, graphql_mapping_template_1.ref)('ctx.stash.authFilter');
13
+ const PARTITION_KEY_VALUE = 'partitionKeyValue';
14
+ class DDBRelationalReferencesResolverGenerator extends ddb_generator_1.DDBRelationalResolverGenerator {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.makeQueryExpression = (references) => {
18
+ if (references.length > 1) {
19
+ const rangeKeyFields = references.slice(1);
20
+ const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(rangeKeyFields);
21
+ return (0, graphql_mapping_template_1.obj)({
22
+ expression: (0, graphql_mapping_template_1.str)('#partitionKey = :partitionKey AND #sortKey = :sortKey'),
23
+ expressionNames: (0, graphql_mapping_template_1.obj)({
24
+ '#partitionKey': (0, graphql_mapping_template_1.str)(references[0]),
25
+ '#sortKey': (0, graphql_mapping_template_1.str)(condensedSortKeyValue),
26
+ }),
27
+ expressionValues: (0, graphql_mapping_template_1.obj)({
28
+ ':partitionKey': (0, graphql_mapping_template_1.ref)(`util.dynamodb.toDynamoDB($${PARTITION_KEY_VALUE})`),
29
+ ':sortKey': (0, graphql_mapping_template_1.ref)(`util.dynamodb.toDynamoDB($${condensedSortKeyValue})`),
30
+ }),
31
+ });
32
+ }
33
+ return (0, graphql_mapping_template_1.obj)({
34
+ expression: (0, graphql_mapping_template_1.str)('#partitionKey = :partitionKey'),
35
+ expressionNames: (0, graphql_mapping_template_1.obj)({
36
+ '#partitionKey': (0, graphql_mapping_template_1.str)(references[0]),
37
+ }),
38
+ expressionValues: (0, graphql_mapping_template_1.obj)({
39
+ ':partitionKey': (0, graphql_mapping_template_1.ref)(`util.dynamodb.toDynamoDB($${PARTITION_KEY_VALUE})`),
40
+ }),
41
+ });
42
+ };
43
+ this.makeHasManyGetItemsConnectionWithKeyResolver = (config, ctx) => {
44
+ const { field, indexName, limit, object, references, relatedType } = config;
45
+ if (references.length < 1) {
46
+ throw new Error('references should be populated.');
47
+ }
48
+ const primaryKeyFields = (0, graphql_transformer_core_1.getPrimaryKeyFields)(object);
49
+ const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
50
+ const dataSource = ctx.api.host.getDataSource(dataSourceName);
51
+ const setup = [
52
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('limit'), (0, graphql_mapping_template_1.ref)(`util.defaultIfNull($context.args.limit, ${limit})`)),
53
+ ...primaryKeyFields
54
+ .slice(1)
55
+ .map((ca, idx) => (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(`${SORT_KEY_VALUE}${idx}`), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttibutes.get("${ca}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${ca}`)))),
56
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('query'), this.makeQueryExpression(references)),
57
+ ];
58
+ setup.push(graphql_transformer_common_1.setArgs, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.compoundExpression)([
59
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), authFilter),
60
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)((0, graphql_mapping_template_1.ref)('args.filter'))), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.obj)({ and: (0, graphql_mapping_template_1.list)([(0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('args.filter')]) }))),
61
+ ]), (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)((0, graphql_mapping_template_1.ref)('args.filter'))), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('args.filter')))), (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)((0, graphql_mapping_template_1.ref)('filter'))), (0, graphql_mapping_template_1.compoundExpression)([
62
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filterExpression'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), (0, graphql_mapping_template_1.ref)('filter')))),
63
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNullOrBlank'), (0, graphql_mapping_template_1.ref)('filterExpression.expression'))), (0, graphql_mapping_template_1.compoundExpression)([
64
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('filterExpression.expressionValues.size')), (0, graphql_mapping_template_1.int)(0)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('filterExpression.remove'), (0, graphql_mapping_template_1.str)('expressionValues')))),
65
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('filterExpression')),
66
+ ])),
67
+ ])));
68
+ const queryArguments = {
69
+ query: (0, graphql_mapping_template_1.raw)('$util.toJson($query)'),
70
+ scanIndexForward: (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('context.args.sortDirection'), (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('context.args.sortDirection'), (0, graphql_mapping_template_1.str)('ASC')), (0, graphql_mapping_template_1.bool)(true), (0, graphql_mapping_template_1.bool)(false)), (0, graphql_mapping_template_1.bool)(true)),
71
+ filter: (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('filter'), (0, graphql_mapping_template_1.ref)('util.toJson($filter)'), (0, graphql_mapping_template_1.nul)()),
72
+ limit: (0, graphql_mapping_template_1.ref)('limit'),
73
+ nextToken: (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.ref)('context.args.nextToken'), (0, graphql_mapping_template_1.ref)('util.toJson($context.args.nextToken)'), (0, graphql_mapping_template_1.nul)()),
74
+ };
75
+ if (indexName) {
76
+ queryArguments.index = (0, graphql_mapping_template_1.str)(indexName);
77
+ }
78
+ const queryObj = graphql_mapping_template_1.DynamoDBMappingTemplate.query(queryArguments);
79
+ const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
80
+ const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, resolverResourceId, dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
81
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
82
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttributes.get("${primaryKeyFields[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${primaryKeyFields[0]}`))),
83
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)), (0, graphql_mapping_template_1.compoundExpression)([(0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.obj)({ items: (0, graphql_mapping_template_1.list)([]) })), (0, graphql_mapping_template_1.raw)('#return($result)')]), (0, graphql_mapping_template_1.compoundExpression)([...setup, queryObj])),
84
+ ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.compoundExpression)([
85
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.raw)('!$result'), (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('result'), (0, graphql_mapping_template_1.ref)('ctx.result'))),
86
+ (0, graphql_mapping_template_1.compoundExpression)([
87
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)()), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.forEach)((0, graphql_mapping_template_1.ref)('item'), (0, graphql_mapping_template_1.ref)('result.items'), [(0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('item.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))])),
88
+ (0, graphql_mapping_template_1.raw)('$util.toJson($result)'),
89
+ ]),
90
+ ]))), `${object.name.value}.${field.name.value}.res.vtl`));
91
+ resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
92
+ ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
93
+ };
94
+ this.makeHasOneGetItemConnectionWithKeyResolver = (config, ctx) => {
95
+ const { field, indexName, references, object, relatedType } = config;
96
+ if (references.length < 1) {
97
+ throw new Error('references should be populated.');
98
+ }
99
+ const primaryKeyFields = (0, graphql_transformer_core_1.getPrimaryKeyFields)(object);
100
+ const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
101
+ const dataSource = ctx.api.host.getDataSource(dataSourceName);
102
+ const partitionKeyName = references[0];
103
+ const totalExpressions = ['#partitionKey = :partitionValue'];
104
+ const totalExpressionNames = {
105
+ '#partitionKey': (0, graphql_mapping_template_1.str)(partitionKeyName),
106
+ };
107
+ const totalExpressionValues = {
108
+ ':partitionValue': this.buildKeyValueExpression(references[0], relatedType, true),
109
+ };
110
+ if (references.length > 2) {
111
+ const rangeKeyFields = references.slice(1);
112
+ const sortKeyName = (0, resolvers_1.condenseRangeKey)(rangeKeyFields);
113
+ const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(primaryKeyFields.slice(1).map((keyField) => `\${ctx.source.${keyField}}`));
114
+ totalExpressions.push('#sortKeyName = :sortKeyName');
115
+ totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
116
+ totalExpressionValues[':sortKeyName'] = (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.defaultIfNullOrBlank("${condensedSortKeyValue}", "${graphql_transformer_common_1.NONE_VALUE}")))`);
117
+ }
118
+ else if (references.length === 2) {
119
+ const sortKeyName = references[1];
120
+ totalExpressions.push('#sortKeyName = :sortKeyName');
121
+ totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
122
+ totalExpressionValues[':sortKeyName'] = this.buildKeyValueExpression(primaryKeyFields[1], ctx.output.getObject(object.name.value));
123
+ }
124
+ const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
125
+ const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, resolverResourceId, dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
126
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
127
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttibutes.get("${primaryKeyFields[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${primaryKeyFields[0]}`))),
128
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)([
129
+ (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)),
130
+ ...primaryKeyFields.slice(1).map((f) => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`)),
131
+ ]), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([
132
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('GetRequest'), (0, graphql_mapping_template_1.obj)({ version: (0, graphql_mapping_template_1.str)('2018-05-29'), operation: (0, graphql_mapping_template_1.str)('Query'), index: (0, graphql_mapping_template_1.str)(indexName) })),
133
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('query'), (0, graphql_mapping_template_1.obj)({
134
+ expression: (0, graphql_mapping_template_1.str)(totalExpressions.join(' AND ')),
135
+ expressionNames: (0, graphql_mapping_template_1.obj)(totalExpressionNames),
136
+ expressionValues: (0, graphql_mapping_template_1.obj)(totalExpressionValues),
137
+ }))),
138
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('filter'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), authFilter))))),
139
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
140
+ ])),
141
+ ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()')), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.compoundExpression)([
142
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('resultValue'), (0, graphql_mapping_template_1.ref)('ctx.result.items[0]')),
143
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)())),
144
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('resultValue.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))),
145
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('resultValue')),
146
+ ]), (0, graphql_mapping_template_1.compoundExpression)([
147
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()'), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.ref)('util.unauthorized()')),
148
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
149
+ ])))), `${object.name.value}.${field.name.value}.res.vtl`));
150
+ resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
151
+ ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
152
+ };
153
+ this.makeBelongsToGetItemConnectionWithKeyResolver = (config, ctx) => {
154
+ const { field, references, object, relatedType } = config;
155
+ const table = (0, graphql_transformer_core_1.getTable)(ctx, relatedType);
156
+ const { keySchema } = table;
157
+ const dataSourceName = (0, graphql_transformer_core_1.getModelDataSourceNameForTypeName)(ctx, relatedType.name.value);
158
+ const dataSource = ctx.api.host.getDataSource(dataSourceName);
159
+ const partitionKeyName = keySchema[0].attributeName;
160
+ const totalExpressions = ['#partitionKey = :partitionValue'];
161
+ const totalExpressionNames = {
162
+ '#partitionKey': (0, graphql_mapping_template_1.str)(partitionKeyName),
163
+ };
164
+ const totalExpressionValues = {
165
+ ':partitionValue': this.buildKeyValueExpression(references[0], ctx.output.getObject(object.name.value), true),
166
+ };
167
+ if (references.length > 2) {
168
+ const rangeKeyFields = references.slice(1);
169
+ const sortKeyName = keySchema[1].attributeName;
170
+ const condensedSortKeyValue = (0, resolvers_1.condenseRangeKey)(rangeKeyFields.map((keyField) => `\${ctx.source.${keyField}}`));
171
+ totalExpressions.push('#sortKeyName = :sortKeyName');
172
+ totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
173
+ totalExpressionValues[':sortKeyName'] = (0, graphql_mapping_template_1.ref)(`util.parseJson($util.dynamodb.toDynamoDBJson($util.defaultIfNullOrBlank("${condensedSortKeyValue}", "${graphql_transformer_common_1.NONE_VALUE}")))`);
174
+ }
175
+ else if (references.length === 2) {
176
+ const sortKeyName = keySchema[1].attributeName;
177
+ totalExpressions.push('#sortKeyName = :sortKeyName');
178
+ totalExpressionNames['#sortKeyName'] = (0, graphql_mapping_template_1.str)(sortKeyName);
179
+ totalExpressionValues[':sortKeyName'] = this.buildKeyValueExpression(references[1], ctx.output.getObject(object.name.value));
180
+ }
181
+ const resolverResourceId = graphql_transformer_common_1.ResolverResourceIDs.ResolverResourceID(object.name.value, field.name.value);
182
+ const resolver = ctx.resolvers.generateQueryResolver(object.name.value, field.name.value, resolverResourceId, dataSource, graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)((0, graphql_mapping_template_1.compoundExpression)([
183
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.ref)('ctx.stash.deniedField'), (0, graphql_mapping_template_1.raw)('#return($util.toJson(null))')),
184
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.ref)(`ctx.stash.connectionAttibutes.get("${references[0]}")`), (0, graphql_mapping_template_1.ref)(`ctx.source.${references[0]}`))),
185
+ (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.or)([
186
+ (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.isNull'), (0, graphql_mapping_template_1.ref)(PARTITION_KEY_VALUE)),
187
+ ...references.slice(1).map((f) => (0, graphql_mapping_template_1.raw)(`$util.isNull($ctx.source.${f})`)),
188
+ ]), (0, graphql_mapping_template_1.raw)('#return'), (0, graphql_mapping_template_1.compoundExpression)([
189
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('GetRequest'), (0, graphql_mapping_template_1.obj)({ version: (0, graphql_mapping_template_1.str)('2018-05-29'), operation: (0, graphql_mapping_template_1.str)('Query') })),
190
+ (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('query'), (0, graphql_mapping_template_1.obj)({
191
+ expression: (0, graphql_mapping_template_1.str)(totalExpressions.join(' AND ')),
192
+ expressionNames: (0, graphql_mapping_template_1.obj)(totalExpressionNames),
193
+ expressionValues: (0, graphql_mapping_template_1.obj)(totalExpressionValues),
194
+ }))),
195
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.isNullOrEmpty)(authFilter)), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('GetRequest.put'), (0, graphql_mapping_template_1.str)('filter'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.parseJson'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.transform.toDynamoDBFilterExpression'), authFilter))))),
196
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('GetRequest')),
197
+ ])),
198
+ ])), `${object.name.value}.${field.name.value}.req.vtl`), graphql_transformer_core_1.MappingTemplate.s3MappingTemplateFromString((0, graphql_mapping_template_1.print)(graphql_mapping_template_1.DynamoDBMappingTemplate.dynamoDBResponse(false, (0, graphql_mapping_template_1.ifElse)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.not)((0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()')), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.compoundExpression)([
199
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('resultValue'), (0, graphql_mapping_template_1.ref)('ctx.result.items[0]')),
200
+ (0, graphql_mapping_template_1.set)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('util.defaultIfNull'), (0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('ctx.source.get'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY)), (0, graphql_mapping_template_1.nul)())),
201
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('operation'), (0, graphql_mapping_template_1.str)('Mutation')), (0, graphql_mapping_template_1.qref)((0, graphql_mapping_template_1.methodCall)((0, graphql_mapping_template_1.ref)('resultValue.put'), (0, graphql_mapping_template_1.str)(graphql_model_transformer_1.OPERATION_KEY), (0, graphql_mapping_template_1.str)('Mutation')))),
202
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.ref)('resultValue')),
203
+ ]), (0, graphql_mapping_template_1.compoundExpression)([
204
+ (0, graphql_mapping_template_1.iff)((0, graphql_mapping_template_1.and)([(0, graphql_mapping_template_1.ref)('ctx.result.items.isEmpty()'), (0, graphql_mapping_template_1.equals)((0, graphql_mapping_template_1.ref)('ctx.result.scannedCount'), (0, graphql_mapping_template_1.int)(1))]), (0, graphql_mapping_template_1.ref)('util.unauthorized()')),
205
+ (0, graphql_mapping_template_1.toJson)((0, graphql_mapping_template_1.nul)()),
206
+ ])))), `${object.name.value}.${field.name.value}.res.vtl`));
207
+ resolver.setScope(ctx.stackManager.getScopeFor(resolverResourceId, CONNECTION_STACK));
208
+ ctx.resolvers.addResolver(object.name.value, field.name.value, resolver);
209
+ };
210
+ }
211
+ }
212
+ exports.DDBRelationalReferencesResolverGenerator = DDBRelationalReferencesResolverGenerator;
213
+ //# sourceMappingURL=ddb-references-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ddb-references-generator.js","sourceRoot":"","sources":["../../src/resolver/ddb-references-generator.ts"],"names":[],"mappings":";;;AAAA,oFAM+C;AAE/C,uEA0BkC;AAClC,2EAAsF;AACtF,sFAAuE;AACvE,4CAAgD;AAEhD,mDAAiE;AAEjE,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAC3C,MAAM,UAAU,GAAG,IAAA,8BAAG,EAAC,sBAAsB,CAAC,CAAC;AAC/C,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEhD,MAAa,wCAAyC,SAAQ,8CAA8B;IAA5F;;QACE,wBAAmB,GAAG,CAAC,UAAoB,EAAc,EAAE;YACzD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC3C,MAAM,qBAAqB,GAAG,IAAA,4BAAgB,EAAC,cAAc,CAAC,CAAC;gBAE/D,OAAO,IAAA,8BAAG,EAAC;oBACT,UAAU,EAAE,IAAA,8BAAG,EAAC,uDAAuD,CAAC;oBACxE,eAAe,EAAE,IAAA,8BAAG,EAAC;wBACnB,eAAe,EAAE,IAAA,8BAAG,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC;wBACnC,UAAU,EAAE,IAAA,8BAAG,EAAC,qBAAqB,CAAC;qBACvC,CAAC;oBACF,gBAAgB,EAAE,IAAA,8BAAG,EAAC;wBACpB,eAAe,EAAE,IAAA,8BAAG,EAAC,6BAA6B,mBAAmB,GAAG,CAAC;wBACzE,UAAU,EAAE,IAAA,8BAAG,EAAC,6BAA6B,qBAAqB,GAAG,CAAC;qBACvE,CAAC;iBACH,CAAC,CAAC;aACJ;YAED,OAAO,IAAA,8B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,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAC;IACJ,CAAC;CAAA;AAzZD,4FAyZC"}
@@ -2,7 +2,7 @@ import { TransformerContextProvider } from '@aws-amplify/graphql-transformer-int
2
2
  import { BelongsToDirectiveConfiguration, HasManyDirectiveConfiguration, HasOneDirectiveConfiguration } from '../types';
3
3
  export declare abstract class RelationalResolverGenerator {
4
4
  abstract makeHasManyGetItemsConnectionWithKeyResolver(config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider): void;
5
- abstract makeHasOneGetItemConnectionWithKeyResolver(config: HasOneDirectiveConfiguration | BelongsToDirectiveConfiguration, ctx: TransformerContextProvider): void;
6
- abstract makeBelongsToGetItemConnectionWithKeyResolver(config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider): void;
5
+ abstract makeHasOneGetItemConnectionWithKeyResolver(config: HasOneDirectiveConfiguration, ctx: TransformerContextProvider): void;
6
+ abstract makeBelongsToGetItemConnectionWithKeyResolver(config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider): void;
7
7
  }
8
8
  //# sourceMappingURL=generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExH,8BAAsB,2BAA2B;IAC/C,QAAQ,CAAC,4CAA4C,CAAC,MAAM,EAAE,6BAA6B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IACnI,QAAQ,CAAC,0CAA0C,CACjD,MAAM,EAAE,4BAA4B,GAAG,+BAA+B,EACtE,GAAG,EAAE,0BAA0B,GAC9B,IAAI;IACP,QAAQ,CAAC,6CAA6C,CAAC,MAAM,EAAE,4BAA4B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;CACpI"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExH,8BAAsB,2BAA2B;IAC/C,QAAQ,CAAC,4CAA4C,CAAC,MAAM,EAAE,6BAA6B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IACnI,QAAQ,CAAC,0CAA0C,CAAC,MAAM,EAAE,4BAA4B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;IAChI,QAAQ,CAAC,6CAA6C,CAAC,MAAM,EAAE,+BAA+B,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI;CACvI"}
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":";;;AAGA,MAAsB,2BAA2B;CAOhD;AAPD,kEAOC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/resolver/generator.ts"],"names":[],"mappings":";;;AAGA,MAAsB,2BAA2B;CAIhD;AAJD,kEAIC"}
@@ -6,7 +6,8 @@ export declare class RDSRelationalResolverGenerator extends RelationalResolverGe
6
6
  makeHasManyGetItemsConnectionWithKeyResolver: (config: HasManyDirectiveConfiguration, ctx: TransformerContextProvider) => void;
7
7
  generateHasManyLambdaRequestTemplate: (tableName: string, operation: string, operationName: string, joinCondition: Expression[]) => string;
8
8
  generateHasOneLambdaRequestTemplate: (tableName: string, operation: string, operationName: string, joinCondition: Expression[], relatedTypePrimaryKeys: string[]) => string;
9
- generateConnectionLambdaResponseMappingTemplate: () => string;
9
+ generateSingleItemConnectionLambdaResponseMappingTemplate: () => string;
10
+ generateListConnectionLambdaResponseMappingTemplate: () => string;
10
11
  makeHasOneGetItemConnectionWithKeyResolver: (config: HasOneDirectiveConfiguration | BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
11
12
  makeBelongsToGetItemConnectionWithKeyResolver: (config: BelongsToDirectiveConfiguration, ctx: TransformerContextProvider) => void;
12
13
  constructFieldMappingInput: () => Expression;
@@ -1 +1 @@
1
- {"version":3,"file":"rds-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/rds-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AASzF,OAAO,EAWL,UAAU,EAKX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxH,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAI1D,qBAAa,8BAA+B,SAAQ,2BAA2B;IAM7E,4CAA4C,WAAY,6BAA6B,OAAO,0BAA0B,KAAG,IAAI,CAyC3H;IAKF,oCAAoC,cACvB,MAAM,aACN,MAAM,iBACF,MAAM,iBACN,UAAU,EAAE,KAC1B,MAAM,CAyBP;IAKF,mCAAmC,cACtB,MAAM,aACN,MAAM,iBACF,MAAM,iBACN,UAAU,EAAE,0BACH,MAAM,EAAE,KAC/B,MAAM,CAsBP;IAKF,+CAA+C,QAAO,MAAM,CAM1D;IAOF,0CAA0C,WAChC,4BAA4B,GAAG,+BAA+B,OACjE,0BAA0B,KAC9B,IAAI,CAgDL;IAEF,6CAA6C,WAAY,+BAA+B,OAAO,0BAA0B,KAAG,IAAI,CAmC9H;IAEF,0BAA0B,QAAO,UAAU,CAUzC;CACH"}
1
+ {"version":3,"file":"rds-generator.d.ts","sourceRoot":"","sources":["../../src/resolver/rds-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AASzF,OAAO,EAWL,UAAU,EAQX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,4BAA4B,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