@aws-amplify/graphql-api-construct 1.18.3-ai-next.0 → 1.18.4
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/.jsii +548 -176
- package/API.md +17 -0
- package/CHANGELOG.md +5 -1
- package/jest.config.js +5 -0
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +4 -3
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +27 -2
- package/lib/log-config-types.d.ts +78 -0
- package/lib/log-config-types.js +8 -0
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/lib/types.d.ts +5 -0
- package/lib/types.js +11 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +15 -54
- package/node_modules/@aws-amplify/graphql-conversation-transformer/CHANGELOG.md +6 -2
- package/node_modules/@aws-amplify/graphql-conversation-transformer/jest.config.js +10 -0
- package/node_modules/@aws-amplify/graphql-conversation-transformer/package.json +12 -48
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +9 -49
- package/node_modules/@aws-amplify/graphql-directives/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-directives/jest.config.js +6 -0
- package/node_modules/@aws-amplify/graphql-directives/package.json +1 -42
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +9 -48
- package/node_modules/@aws-amplify/graphql-generation-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/jest.config.js +9 -0
- package/node_modules/@aws-amplify/graphql-generation-transformer/package.json +9 -44
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +9 -48
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +10 -46
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +13 -49
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +9 -49
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/jest.config.js +5 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +9 -48
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +11 -47
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +10 -52
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +10 -49
- package/node_modules/@aws-amplify/graphql-transformer/API.md +2 -0
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +5 -1
- package/node_modules/@aws-amplify/graphql-transformer/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts +2 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js +2 -1
- package/node_modules/@aws-amplify/graphql-transformer/lib/graphql-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer/package.json +20 -61
- package/node_modules/@aws-amplify/graphql-transformer/src/graphql-transformer.ts +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/API.md +3 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/LICENSE +201 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/jest.config.js +12 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts +4 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js +27 -7
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/graphql-api.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts +4 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js +5 -3
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts +3 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js +2 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformer-context/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +7 -46
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/API.md +12 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.d.ts +8 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.d.ts.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.js +3 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/lib/transformer-context/logConfig.js.map +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +2 -35
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/index.ts +1 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/src/transformer-context/logConfig.ts +8 -0
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/CHANGELOG.md +4 -0
- package/node_modules/graphql-mapping-template/jest.config.js +12 -0
- package/node_modules/graphql-mapping-template/package.json +1 -41
- package/node_modules/graphql-transformer-common/CHANGELOG.md +4 -0
- package/node_modules/graphql-transformer-common/jest.config.js +12 -0
- package/node_modules/graphql-transformer-common/package.json +2 -42
- package/package.json +82 -123
- package/src/amplify-graphql-api.ts +2 -0
- package/src/index.ts +35 -0
- package/src/log-config-types.ts +84 -0
- package/src/types.ts +105 -0
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.0.2](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@5.0.1...graphql-mapping-template@5.0.2) (2024-12-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package graphql-mapping-template
|
|
9
|
+
|
|
6
10
|
## [5.0.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-mapping-template@5.0.0...graphql-mapping-template@5.0.1) (2024-09-06)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package graphql-mapping-template
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql-mapping-template",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "An AST wrapper around AWS AppSync resolvers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,45 +24,5 @@
|
|
|
24
24
|
"watch": "tsc -w",
|
|
25
25
|
"clean": "rimraf ./lib",
|
|
26
26
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
|
27
|
-
},
|
|
28
|
-
"jest": {
|
|
29
|
-
"transform": {
|
|
30
|
-
"^.+\\.tsx?$": "ts-jest"
|
|
31
|
-
},
|
|
32
|
-
"testEnvironmentOptions": {
|
|
33
|
-
"url": "http://localhost"
|
|
34
|
-
},
|
|
35
|
-
"testRegex": "(src/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
|
36
|
-
"moduleFileExtensions": [
|
|
37
|
-
"ts",
|
|
38
|
-
"tsx",
|
|
39
|
-
"js",
|
|
40
|
-
"jsx",
|
|
41
|
-
"json",
|
|
42
|
-
"node"
|
|
43
|
-
],
|
|
44
|
-
"collectCoverage": true,
|
|
45
|
-
"coverageProvider": "v8",
|
|
46
|
-
"coverageThreshold": {
|
|
47
|
-
"global": {
|
|
48
|
-
"branches": 59,
|
|
49
|
-
"functions": 31,
|
|
50
|
-
"lines": 50
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"coverageReporters": [
|
|
54
|
-
"clover",
|
|
55
|
-
"text"
|
|
56
|
-
],
|
|
57
|
-
"collectCoverageFrom": [
|
|
58
|
-
"src/**/*.ts"
|
|
59
|
-
],
|
|
60
|
-
"coveragePathIgnorePatterns": [
|
|
61
|
-
"/__tests__/"
|
|
62
|
-
],
|
|
63
|
-
"snapshotFormat": {
|
|
64
|
-
"escapeString": true,
|
|
65
|
-
"printBasicPrototype": true
|
|
66
|
-
}
|
|
67
27
|
}
|
|
68
28
|
}
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.1.2](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@5.1.1...graphql-transformer-common@5.1.2) (2024-12-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package graphql-transformer-common
|
|
9
|
+
|
|
6
10
|
## [5.1.1](https://github.com/aws-amplify/amplify-category-api/compare/graphql-transformer-common@5.1.0...graphql-transformer-common@5.1.1) (2024-11-08)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package graphql-transformer-common
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql-transformer-common",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"description": "Common code and constants for AppSync Transformers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,51 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"graphql": "^15.5.0",
|
|
29
|
-
"graphql-mapping-template": "5.0.
|
|
29
|
+
"graphql-mapping-template": "5.0.2",
|
|
30
30
|
"md5": "^2.2.1",
|
|
31
31
|
"pluralize": "8.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/md5": "^2.3.1"
|
|
35
|
-
},
|
|
36
|
-
"jest": {
|
|
37
|
-
"collectCoverage": true,
|
|
38
|
-
"coverageProvider": "v8",
|
|
39
|
-
"coverageThreshold": {
|
|
40
|
-
"global": {
|
|
41
|
-
"branches": 35,
|
|
42
|
-
"functions": 8,
|
|
43
|
-
"lines": 8
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"coverageReporters": [
|
|
47
|
-
"clover",
|
|
48
|
-
"text"
|
|
49
|
-
],
|
|
50
|
-
"transform": {
|
|
51
|
-
"^.+\\.tsx?$": "ts-jest"
|
|
52
|
-
},
|
|
53
|
-
"testEnvironmentOptions": {
|
|
54
|
-
"url": "http://localhost"
|
|
55
|
-
},
|
|
56
|
-
"testRegex": "(src/__tests__/.*.test.*)$",
|
|
57
|
-
"moduleFileExtensions": [
|
|
58
|
-
"ts",
|
|
59
|
-
"tsx",
|
|
60
|
-
"js",
|
|
61
|
-
"jsx",
|
|
62
|
-
"json",
|
|
63
|
-
"node"
|
|
64
|
-
],
|
|
65
|
-
"collectCoverageFrom": [
|
|
66
|
-
"src/**/*.ts"
|
|
67
|
-
],
|
|
68
|
-
"coveragePathIgnorePatterns": [
|
|
69
|
-
"/__tests__/"
|
|
70
|
-
],
|
|
71
|
-
"snapshotFormat": {
|
|
72
|
-
"escapeString": true,
|
|
73
|
-
"printBasicPrototype": true
|
|
74
|
-
}
|
|
75
35
|
}
|
|
76
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/graphql-api-construct",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.4",
|
|
4
4
|
"description": "AppSync GraphQL Api Construct using Amplify GraphQL Transformer.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"bundledDependencies": [
|
|
37
|
+
"@aws-amplify/ai-constructs",
|
|
37
38
|
"@aws-amplify/backend-output-schemas",
|
|
38
39
|
"@aws-amplify/backend-output-storage",
|
|
39
40
|
"@aws-amplify/graphql-auth-transformer",
|
|
@@ -55,56 +56,47 @@
|
|
|
55
56
|
"@aws-amplify/graphql-transformer-interfaces",
|
|
56
57
|
"@aws-amplify/platform-core",
|
|
57
58
|
"@aws-amplify/plugin-types",
|
|
58
|
-
"@aws-amplify/ai-constructs",
|
|
59
|
-
"@aws-sdk/client-bedrock-runtime",
|
|
60
|
-
"@smithy/eventstream-serde-browser",
|
|
61
|
-
"@smithy/eventstream-serde-config-resolver",
|
|
62
|
-
"@smithy/eventstream-serde-node",
|
|
63
|
-
"@smithy/eventstream-serde-universal",
|
|
64
|
-
"@smithy/eventstream-codec",
|
|
65
59
|
"@aws-crypto/crc32",
|
|
66
|
-
"charenc",
|
|
67
|
-
"crypt",
|
|
68
|
-
"fs-extra",
|
|
69
|
-
"graceful-fs",
|
|
70
|
-
"graphql",
|
|
71
|
-
"graphql-mapping-template",
|
|
72
|
-
"graphql-transformer-common",
|
|
73
|
-
"hjson",
|
|
74
|
-
"immer",
|
|
75
|
-
"is-buffer",
|
|
76
|
-
"jsonfile",
|
|
77
|
-
"libphonenumber-js",
|
|
78
|
-
"lodash",
|
|
79
|
-
"md5",
|
|
80
|
-
"object-hash",
|
|
81
|
-
"pluralize",
|
|
82
|
-
"ts-dedent",
|
|
83
|
-
"universalify",
|
|
84
|
-
"zod",
|
|
85
|
-
"@aws-sdk/client-sts",
|
|
86
|
-
"is-ci",
|
|
87
|
-
"lodash.mergewith",
|
|
88
|
-
"uuid",
|
|
89
60
|
"@aws-crypto/sha256-browser",
|
|
90
61
|
"@aws-crypto/sha256-js",
|
|
62
|
+
"@aws-crypto/supports-web-crypto",
|
|
63
|
+
"@aws-crypto/util",
|
|
64
|
+
"@aws-sdk/client-bedrock-runtime",
|
|
65
|
+
"@aws-sdk/client-sso",
|
|
91
66
|
"@aws-sdk/client-sso-oidc",
|
|
67
|
+
"@aws-sdk/client-sts",
|
|
92
68
|
"@aws-sdk/core",
|
|
69
|
+
"@aws-sdk/credential-provider-env",
|
|
70
|
+
"@aws-sdk/credential-provider-http",
|
|
71
|
+
"@aws-sdk/credential-provider-ini",
|
|
93
72
|
"@aws-sdk/credential-provider-node",
|
|
73
|
+
"@aws-sdk/credential-provider-process",
|
|
74
|
+
"@aws-sdk/credential-provider-sso",
|
|
75
|
+
"@aws-sdk/credential-provider-web-identity",
|
|
94
76
|
"@aws-sdk/middleware-host-header",
|
|
95
77
|
"@aws-sdk/middleware-logger",
|
|
96
78
|
"@aws-sdk/middleware-recursion-detection",
|
|
97
79
|
"@aws-sdk/middleware-user-agent",
|
|
98
80
|
"@aws-sdk/region-config-resolver",
|
|
81
|
+
"@aws-sdk/token-providers",
|
|
99
82
|
"@aws-sdk/types",
|
|
100
83
|
"@aws-sdk/util-endpoints",
|
|
84
|
+
"@aws-sdk/util-locate-window",
|
|
101
85
|
"@aws-sdk/util-user-agent-browser",
|
|
102
86
|
"@aws-sdk/util-user-agent-node",
|
|
87
|
+
"@smithy/abort-controller",
|
|
103
88
|
"@smithy/config-resolver",
|
|
104
89
|
"@smithy/core",
|
|
90
|
+
"@smithy/credential-provider-imds",
|
|
91
|
+
"@smithy/eventstream-codec",
|
|
92
|
+
"@smithy/eventstream-serde-browser",
|
|
93
|
+
"@smithy/eventstream-serde-config-resolver",
|
|
94
|
+
"@smithy/eventstream-serde-node",
|
|
95
|
+
"@smithy/eventstream-serde-universal",
|
|
105
96
|
"@smithy/fetch-http-handler",
|
|
106
97
|
"@smithy/hash-node",
|
|
107
98
|
"@smithy/invalid-dependency",
|
|
99
|
+
"@smithy/is-array-buffer",
|
|
108
100
|
"@smithy/middleware-content-length",
|
|
109
101
|
"@smithy/middleware-endpoint",
|
|
110
102
|
"@smithy/middleware-retry",
|
|
@@ -112,72 +104,80 @@
|
|
|
112
104
|
"@smithy/middleware-stack",
|
|
113
105
|
"@smithy/node-config-provider",
|
|
114
106
|
"@smithy/node-http-handler",
|
|
107
|
+
"@smithy/property-provider",
|
|
115
108
|
"@smithy/protocol-http",
|
|
109
|
+
"@smithy/querystring-builder",
|
|
110
|
+
"@smithy/querystring-parser",
|
|
111
|
+
"@smithy/service-error-classification",
|
|
112
|
+
"@smithy/shared-ini-file-loader",
|
|
113
|
+
"@smithy/signature-v4",
|
|
116
114
|
"@smithy/smithy-client",
|
|
117
115
|
"@smithy/types",
|
|
118
116
|
"@smithy/url-parser",
|
|
119
117
|
"@smithy/util-base64",
|
|
120
118
|
"@smithy/util-body-length-browser",
|
|
121
119
|
"@smithy/util-body-length-node",
|
|
120
|
+
"@smithy/util-buffer-from",
|
|
121
|
+
"@smithy/util-config-provider",
|
|
122
122
|
"@smithy/util-defaults-mode-browser",
|
|
123
123
|
"@smithy/util-defaults-mode-node",
|
|
124
124
|
"@smithy/util-endpoints",
|
|
125
|
+
"@smithy/util-hex-encoding",
|
|
125
126
|
"@smithy/util-middleware",
|
|
126
127
|
"@smithy/util-retry",
|
|
128
|
+
"@smithy/util-stream",
|
|
129
|
+
"@smithy/util-uri-escape",
|
|
127
130
|
"@smithy/util-utf8",
|
|
128
|
-
"
|
|
131
|
+
"bowser",
|
|
132
|
+
"charenc",
|
|
129
133
|
"ci-info",
|
|
130
|
-
"
|
|
131
|
-
"@aws-crypto/util",
|
|
132
|
-
"@aws-sdk/util-locate-window",
|
|
133
|
-
"@smithy/signature-v4",
|
|
134
|
+
"crypt",
|
|
134
135
|
"fast-xml-parser",
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"@smithy/is-array-buffer",
|
|
153
|
-
"@smithy/util-hex-encoding",
|
|
154
|
-
"@smithy/util-uri-escape",
|
|
136
|
+
"fs-extra",
|
|
137
|
+
"graceful-fs",
|
|
138
|
+
"graphql",
|
|
139
|
+
"graphql-mapping-template",
|
|
140
|
+
"graphql-transformer-common",
|
|
141
|
+
"hjson",
|
|
142
|
+
"immer",
|
|
143
|
+
"is-buffer",
|
|
144
|
+
"is-ci",
|
|
145
|
+
"jsonfile",
|
|
146
|
+
"libphonenumber-js",
|
|
147
|
+
"lodash",
|
|
148
|
+
"lodash.mergewith",
|
|
149
|
+
"md5",
|
|
150
|
+
"object-hash",
|
|
151
|
+
"pluralize",
|
|
152
|
+
"semver",
|
|
155
153
|
"strnum",
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
154
|
+
"ts-dedent",
|
|
155
|
+
"tslib",
|
|
156
|
+
"universalify",
|
|
157
|
+
"uuid",
|
|
158
|
+
"zod"
|
|
159
159
|
],
|
|
160
160
|
"dependencies": {
|
|
161
161
|
"@aws-amplify/ai-constructs": "^1.0.0",
|
|
162
162
|
"@aws-amplify/backend-output-schemas": "^1.0.0",
|
|
163
163
|
"@aws-amplify/backend-output-storage": "^1.0.0",
|
|
164
|
-
"@aws-amplify/graphql-auth-transformer": "4.1.
|
|
165
|
-
"@aws-amplify/graphql-conversation-transformer": "1.1.
|
|
166
|
-
"@aws-amplify/graphql-default-value-transformer": "3.1.
|
|
167
|
-
"@aws-amplify/graphql-directives": "2.6.
|
|
168
|
-
"@aws-amplify/graphql-function-transformer": "3.1.
|
|
169
|
-
"@aws-amplify/graphql-generation-transformer": "1.1.
|
|
170
|
-
"@aws-amplify/graphql-http-transformer": "3.0.
|
|
171
|
-
"@aws-amplify/graphql-index-transformer": "3.0.
|
|
172
|
-
"@aws-amplify/graphql-maps-to-transformer": "4.0.
|
|
173
|
-
"@aws-amplify/graphql-model-transformer": "3.1.
|
|
174
|
-
"@aws-amplify/graphql-predictions-transformer": "3.0.
|
|
175
|
-
"@aws-amplify/graphql-relational-transformer": "3.1.
|
|
176
|
-
"@aws-amplify/graphql-searchable-transformer": "3.0.
|
|
177
|
-
"@aws-amplify/graphql-sql-transformer": "0.4.
|
|
178
|
-
"@aws-amplify/graphql-transformer": "2.2.
|
|
179
|
-
"@aws-amplify/graphql-transformer-core": "3.3.
|
|
180
|
-
"@aws-amplify/graphql-transformer-interfaces": "4.2.
|
|
164
|
+
"@aws-amplify/graphql-auth-transformer": "4.1.9",
|
|
165
|
+
"@aws-amplify/graphql-conversation-transformer": "1.1.4",
|
|
166
|
+
"@aws-amplify/graphql-default-value-transformer": "3.1.6",
|
|
167
|
+
"@aws-amplify/graphql-directives": "2.6.1",
|
|
168
|
+
"@aws-amplify/graphql-function-transformer": "3.1.8",
|
|
169
|
+
"@aws-amplify/graphql-generation-transformer": "1.1.2",
|
|
170
|
+
"@aws-amplify/graphql-http-transformer": "3.0.11",
|
|
171
|
+
"@aws-amplify/graphql-index-transformer": "3.0.11",
|
|
172
|
+
"@aws-amplify/graphql-maps-to-transformer": "4.0.11",
|
|
173
|
+
"@aws-amplify/graphql-model-transformer": "3.1.3",
|
|
174
|
+
"@aws-amplify/graphql-predictions-transformer": "3.0.11",
|
|
175
|
+
"@aws-amplify/graphql-relational-transformer": "3.1.3",
|
|
176
|
+
"@aws-amplify/graphql-searchable-transformer": "3.0.11",
|
|
177
|
+
"@aws-amplify/graphql-sql-transformer": "0.4.11",
|
|
178
|
+
"@aws-amplify/graphql-transformer": "2.2.4",
|
|
179
|
+
"@aws-amplify/graphql-transformer-core": "3.3.3",
|
|
180
|
+
"@aws-amplify/graphql-transformer-interfaces": "4.2.1",
|
|
181
181
|
"@aws-amplify/platform-core": "^1.0.0",
|
|
182
182
|
"@aws-amplify/plugin-types": "^1.0.0",
|
|
183
183
|
"@aws-crypto/crc32": "5.2.0",
|
|
@@ -260,8 +260,8 @@
|
|
|
260
260
|
"fs-extra": "^8.1.0",
|
|
261
261
|
"graceful-fs": "^4.2.0",
|
|
262
262
|
"graphql": "^15.5.0",
|
|
263
|
-
"graphql-mapping-template": "5.0.
|
|
264
|
-
"graphql-transformer-common": "5.1.
|
|
263
|
+
"graphql-mapping-template": "5.0.2",
|
|
264
|
+
"graphql-transformer-common": "5.1.2",
|
|
265
265
|
"hjson": "^3.2.2",
|
|
266
266
|
"immer": "^9.0.12",
|
|
267
267
|
"is-buffer": "~1.1.6",
|
|
@@ -282,21 +282,20 @@
|
|
|
282
282
|
"zod": "^3.22.2"
|
|
283
283
|
},
|
|
284
284
|
"devDependencies": {
|
|
285
|
-
"@aws-amplify/graphql-transformer-test-utils": "1.0.
|
|
285
|
+
"@aws-amplify/graphql-transformer-test-utils": "1.0.10",
|
|
286
286
|
"@types/fs-extra": "^8.0.1",
|
|
287
287
|
"@types/node": "^18.0.0",
|
|
288
|
-
"aws-cdk-lib": "2.
|
|
288
|
+
"aws-cdk-lib": "2.168.0",
|
|
289
289
|
"constructs": "10.3.0",
|
|
290
290
|
"jsii": "^5.4.23",
|
|
291
291
|
"jsii-docgen": "9.1.2",
|
|
292
292
|
"jsii-pacmak": "^1.84.0",
|
|
293
293
|
"jsii-rosetta": "^5.4.23",
|
|
294
294
|
"rimraf": "^3.0.0",
|
|
295
|
-
"ts-jest": "^29.0.0",
|
|
296
295
|
"ts-node": "^8.10.1"
|
|
297
296
|
},
|
|
298
297
|
"peerDependencies": {
|
|
299
|
-
"aws-cdk-lib": "^2.
|
|
298
|
+
"aws-cdk-lib": "^2.168.0",
|
|
300
299
|
"constructs": "^10.3.0"
|
|
301
300
|
},
|
|
302
301
|
"stability": "stable",
|
|
@@ -313,45 +312,5 @@
|
|
|
313
312
|
"outDir": "lib"
|
|
314
313
|
}
|
|
315
314
|
},
|
|
316
|
-
"
|
|
317
|
-
"testEnvironmentOptions": {
|
|
318
|
-
"url": "http://localhost"
|
|
319
|
-
},
|
|
320
|
-
"transform": {
|
|
321
|
-
"^.+\\.tsx?$": "ts-jest"
|
|
322
|
-
},
|
|
323
|
-
"testRegex": "((\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
|
324
|
-
"moduleFileExtensions": [
|
|
325
|
-
"ts",
|
|
326
|
-
"tsx",
|
|
327
|
-
"js",
|
|
328
|
-
"jsx",
|
|
329
|
-
"json",
|
|
330
|
-
"node"
|
|
331
|
-
],
|
|
332
|
-
"collectCoverage": true,
|
|
333
|
-
"coverageProvider": "v8",
|
|
334
|
-
"coverageThreshold": {
|
|
335
|
-
"global": {
|
|
336
|
-
"branches": 89,
|
|
337
|
-
"functions": 90,
|
|
338
|
-
"lines": 58
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
"coverageReporters": [
|
|
342
|
-
"clover",
|
|
343
|
-
"text"
|
|
344
|
-
],
|
|
345
|
-
"collectCoverageFrom": [
|
|
346
|
-
"src/**/*.ts"
|
|
347
|
-
],
|
|
348
|
-
"coveragePathIgnorePatterns": [
|
|
349
|
-
"/__tests__/"
|
|
350
|
-
],
|
|
351
|
-
"snapshotFormat": {
|
|
352
|
-
"escapeString": true,
|
|
353
|
-
"printBasicPrototype": true
|
|
354
|
-
}
|
|
355
|
-
},
|
|
356
|
-
"gitHead": "0a000c454da053608a1c150c3d617c7c09cc8ee7"
|
|
315
|
+
"gitHead": "a1ec8b0438f8177d3bde902a040f285bd78bc7cb"
|
|
357
316
|
}
|
|
@@ -160,6 +160,7 @@ export class AmplifyGraphqlApi extends Construct {
|
|
|
160
160
|
functionNameMap,
|
|
161
161
|
outputStorageStrategy,
|
|
162
162
|
dataStoreConfiguration,
|
|
163
|
+
logging,
|
|
163
164
|
} = props;
|
|
164
165
|
|
|
165
166
|
// TODO: GEN1_GEN2_MIGRATION
|
|
@@ -250,6 +251,7 @@ export class AmplifyGraphqlApi extends Construct {
|
|
|
250
251
|
rdsLayerMapping: undefined,
|
|
251
252
|
rdsSnsTopicMapping: undefined,
|
|
252
253
|
...getDataSourceStrategiesProvider(definition),
|
|
254
|
+
logging,
|
|
253
255
|
};
|
|
254
256
|
|
|
255
257
|
executeTransform(executeTransformConfig);
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
// ############################################################################
|
|
2
|
+
// Note that sections of this file are excluded from test coverage metrics with
|
|
3
|
+
// 'c8 ignore' comments. If you add code to this file, suppress non-executable
|
|
4
|
+
// code from coverage metrics by using a `c8 ignore`. If the code is
|
|
5
|
+
// executable, you MUST NOT suppress it from coverage metrics.
|
|
6
|
+
//
|
|
7
|
+
// `ignore` statements must only span a single block of code. Do not apply an
|
|
8
|
+
// `ignore` statement to multiple blocks, or the entire file.
|
|
9
|
+
// ############################################################################
|
|
10
|
+
|
|
1
11
|
/* ATTENTION
|
|
2
12
|
*
|
|
3
13
|
* If you modify this file you must also modify packages/amplify-data-construct/src/index.ts to have the same exports
|
|
4
14
|
*/
|
|
15
|
+
/* c8 ignore start */
|
|
5
16
|
export type {
|
|
6
17
|
IAMAuthorizationConfig,
|
|
7
18
|
IdentityPoolAuthorizationConfig,
|
|
@@ -34,8 +45,17 @@ export type {
|
|
|
34
45
|
IBackendOutputEntry,
|
|
35
46
|
AddFunctionProps,
|
|
36
47
|
} from './types';
|
|
48
|
+
/* c8 ignore stop */
|
|
49
|
+
|
|
50
|
+
/* c8 ignore start */
|
|
37
51
|
export { AmplifyGraphqlApi } from './amplify-graphql-api';
|
|
52
|
+
/* c8 ignore stop */
|
|
53
|
+
|
|
54
|
+
/* c8 ignore start */
|
|
38
55
|
export { AmplifyGraphqlDefinition } from './amplify-graphql-definition';
|
|
56
|
+
/* c8 ignore stop */
|
|
57
|
+
|
|
58
|
+
/* c8 ignore start */
|
|
39
59
|
export {
|
|
40
60
|
AmplifyDynamoDbTableWrapper,
|
|
41
61
|
TimeToLiveSpecification,
|
|
@@ -44,5 +64,20 @@ export {
|
|
|
44
64
|
SSEType,
|
|
45
65
|
StreamSpecification,
|
|
46
66
|
} from './amplify-dynamodb-table-wrapper';
|
|
67
|
+
/* c8 ignore stop */
|
|
68
|
+
|
|
69
|
+
/* c8 ignore start */
|
|
47
70
|
export { SQLLambdaModelDataSourceStrategyFactory } from './sql-model-datasource-strategy';
|
|
71
|
+
/* c8 ignore stop */
|
|
72
|
+
|
|
73
|
+
/* c8 ignore start */
|
|
48
74
|
export * from './model-datasource-strategy-types';
|
|
75
|
+
/* c8 ignore stop */
|
|
76
|
+
|
|
77
|
+
/* c8 ignore start */
|
|
78
|
+
export type { LogConfig, Logging } from './log-config-types';
|
|
79
|
+
/* c8 ignore stop */
|
|
80
|
+
|
|
81
|
+
/* c8 ignore start */
|
|
82
|
+
export { FieldLogLevel, RetentionDays } from './log-config-types';
|
|
83
|
+
/* c8 ignore stop */
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { FieldLogLevel } from 'aws-cdk-lib/aws-appsync';
|
|
2
|
+
import { RetentionDays } from 'aws-cdk-lib/aws-logs';
|
|
3
|
+
|
|
4
|
+
// Reimporting and reexporting FieldLogLevel and RetentionDays to reduce the number of imports required to use logConfig.
|
|
5
|
+
export { FieldLogLevel, RetentionDays };
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Customizable logging configuration when writing GraphQL operations and tracing to Amazon CloudWatch for an AWS AppSync GraphQL API.
|
|
9
|
+
*
|
|
10
|
+
* **WARNING**: Verbose logging will log the full incoming query including user parameters.
|
|
11
|
+
* Sensitive information may be exposed in CloudWatch logs. Ensure that your IAM policies only grant access to authorized users.
|
|
12
|
+
*
|
|
13
|
+
* For information on LogConfig, refer to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html.
|
|
14
|
+
* For information on RetentionDays, refer to https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.RetentionDays.html.
|
|
15
|
+
*
|
|
16
|
+
* @default excludeVerboseContent: true, fieldLogLevel: FieldLogLevel.NONE, retention: RetentionDays.ONE_WEEK
|
|
17
|
+
*/
|
|
18
|
+
export interface LogConfig {
|
|
19
|
+
/**
|
|
20
|
+
* The number of days log events are kept in CloudWatch Logs.
|
|
21
|
+
*
|
|
22
|
+
* @default RetentionDays.ONE_WEEK
|
|
23
|
+
* @see https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.RetentionDays.html
|
|
24
|
+
*/
|
|
25
|
+
readonly retention?: RetentionDays;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* When set to `true`, excludes verbose information from the logs, such as:
|
|
29
|
+
* - GraphQL Query
|
|
30
|
+
* - Request Headers
|
|
31
|
+
* - Response Headers
|
|
32
|
+
* - Context
|
|
33
|
+
* - Evaluated Mapping Templates
|
|
34
|
+
*
|
|
35
|
+
* This setting applies regardless of the specified logging level.
|
|
36
|
+
*
|
|
37
|
+
* **WARNING**: Verbose logging will log the full incoming query including user parameters.
|
|
38
|
+
* Sensitive information may be exposed in CloudWatch logs. Ensure that your IAM policies only grant access to authorized users.
|
|
39
|
+
*
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
readonly excludeVerboseContent?: boolean;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The field logging level. Values can be `NONE`, `ERROR`, `INFO`, `DEBUG`, or `ALL`.
|
|
46
|
+
*
|
|
47
|
+
* - **NONE**: No field-level logs are captured.
|
|
48
|
+
* - **ERROR**: Logs the following information only for the fields that are in the error category:
|
|
49
|
+
* - The error section in the server response.
|
|
50
|
+
* - Field-level errors.
|
|
51
|
+
* - The generated request/response functions that got resolved for error fields.
|
|
52
|
+
* - **INFO**: Logs the following information only for the fields that are in the info and error categories:
|
|
53
|
+
* - Info-level messages.
|
|
54
|
+
* - The user messages sent through `$util.log.info` and `console.log`.
|
|
55
|
+
* - Field-level tracing and mapping logs are not shown.
|
|
56
|
+
* - **DEBUG**: Logs the following information only for the fields that are in the debug, info, and error categories:
|
|
57
|
+
* - Debug-level messages.
|
|
58
|
+
* - The user messages sent through `$util.log.info`, `$util.log.debug`, `console.log`, and `console.debug`.
|
|
59
|
+
* - Field-level tracing and mapping logs are not shown.
|
|
60
|
+
* - **ALL**: The following information is logged for all fields in the query:
|
|
61
|
+
* - Field-level tracing information.
|
|
62
|
+
* - The generated request/response functions that were resolved for each field.
|
|
63
|
+
*
|
|
64
|
+
* @default FieldLogLevel.NONE
|
|
65
|
+
*/
|
|
66
|
+
readonly fieldLogLevel?: FieldLogLevel;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The logging configuration when writing GraphQL operations and tracing to Amazon CloudWatch for an AWS AppSync GraphQL API.
|
|
71
|
+
* Values can be `true` or a `LogConfig` object.
|
|
72
|
+
*
|
|
73
|
+
* ### Defaults
|
|
74
|
+
* Default settings will be applied when logging is set to `true` or an empty object, or for unspecified fields:
|
|
75
|
+
* - `excludeVerboseContent`: `true`
|
|
76
|
+
* - `fieldLogLevel`: `FieldLogLevel.NONE`
|
|
77
|
+
* - `retention`: `RetentionDays.ONE_WEEK`
|
|
78
|
+
*
|
|
79
|
+
* **WARNING**: Verbose logging will log the full incoming query including user parameters.
|
|
80
|
+
* Sensitive information may be exposed in CloudWatch logs. Ensure that your IAM policies only grant access to authorized users.
|
|
81
|
+
*
|
|
82
|
+
* For information on LogConfig, refer to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html.
|
|
83
|
+
*/
|
|
84
|
+
export type Logging = true | LogConfig;
|