@aws-amplify/graphql-api-construct 1.18.3-ai-next.0 → 1.18.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graphql-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-transformer.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EAEd,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,0BAA0B,EAC3B,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,
|
1
|
+
{"version":3,"file":"graphql-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-transformer.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EAEd,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,0BAA0B,EAC3B,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,4BAA4B,EAC5B,uBAAuB,EACvB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AAS,CAAC;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,OAAO,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC;AAMJ,eAAO,MAAM,0BAA0B,QAAS,cAAc,KAAG,IAiBhE,CAAC;AAOF,eAAO,MAAM,gBAAgB,WAAY,sBAAsB,KAAG,IAmCjE,CAAC"}
|
@@ -80,7 +80,7 @@ const defaultPrintTransformerLog = (log) => {
|
|
80
80
|
};
|
81
81
|
exports.defaultPrintTransformerLog = defaultPrintTransformerLog;
|
82
82
|
const executeTransform = (config) => {
|
83
|
-
const { assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, printTransformerLog, rdsLayerMapping, rdsSnsTopicMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, } = config;
|
83
|
+
const { assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, printTransformerLog, rdsLayerMapping, rdsSnsTopicMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, logging, } = config;
|
84
84
|
const printLog = printTransformerLog !== null && printTransformerLog !== void 0 ? printTransformerLog : exports.defaultPrintTransformerLog;
|
85
85
|
const transform = (0, exports.constructTransform)(config);
|
86
86
|
try {
|
@@ -95,6 +95,7 @@ const executeTransform = (config) => {
|
|
95
95
|
scope,
|
96
96
|
sqlDirectiveDataSourceStrategies,
|
97
97
|
synthParameters,
|
98
|
+
logging,
|
98
99
|
});
|
99
100
|
}
|
100
101
|
finally {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graphql-transformer.js","sourceRoot":"","sources":["../src/graphql-transformer.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AACxE,sGAAyF;AACzF,4FAAgF;AAChF,oFAAwE;AACxE,sFAAiG;AACjG,0FAAkG;AAClG,sFAA0E;AAC1E,kFAAsE;AACtE,kGAAsF;AACtF,gGAKqD;AACrD,gGAAyF;AACzF,gGASqD;
|
1
|
+
{"version":3,"file":"graphql-transformer.js","sourceRoot":"","sources":["../src/graphql-transformer.ts"],"names":[],"mappings":";;;AAAA,oFAAwE;AACxE,sGAAyF;AACzF,4FAAgF;AAChF,oFAAwE;AACxE,sFAAiG;AACjG,0FAAkG;AAClG,sFAA0E;AAC1E,kFAAsE;AACtE,kGAAsF;AACtF,gGAKqD;AACrD,gGAAyF;AACzF,gGASqD;AAQrD,oFAA0G;AAG1G,gGAAoF;AACpF,oGAAwF;AAyBjF,MAAM,yBAAyB,GAAG,CAAC,OAAgC,EAA+B,EAAE;;IACzG,MAAM,gBAAgB,GAAG,IAAI,4CAAgB,EAAE,CAAC;IAChD,MAAM,eAAe,GAAG,IAAI,0CAAe,EAAE,CAAC;IAC9C,MAAM,gBAAgB,GAAG,IAAI,4CAAgB,EAAE,CAAC;IAChD,MAAM,iBAAiB,GAAG,IAAI,kDAAiB,EAAE,CAAC;IAClD,MAAM,kBAAkB,GAAG,IAAI,mDAAkB,EAAE,CAAC;IACpD,MAAM,oBAAoB,GAAG,IAAI,qDAAoB,EAAE,CAAC;IAGxD,OAAO;QACL,gBAAgB;QAChB,IAAI,kDAAmB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,CAAC;QACjD,IAAI,0CAAe,EAAE;QACrB,IAAI,wDAAsB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC;QAClD,IAAI,iDAAqB,EAAE;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,iBAAiB;QACjB,IAAI,sDAAqB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,CAAC;QACjG,oBAAoB;QACpB,IAAI,0DAAuB,CACzB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,EAC9B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CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC3B,MAAM;QACR;YACE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KAC9B;AACH,CAAC,CAAC;AAjBW,QAAA,0BAA0B,8BAiBrC;AAOK,MAAM,gBAAgB,GAAG,CAAC,MAA8B,EAAQ,EAAE;IACvE,MAAM,EACJ,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,gCAAgC,EAChC,eAAe,EACf,OAAO,GACR,GAAG,MAAM,CAAC;IAEX,MAAM,QAAQ,GAAG,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,kCAA0B,CAAC;IACnE,MAAM,SAAS,GAAG,IAAA,0BAAkB,EAAC,MAAM,CAAC,CAAC;IAC7C,IAAI;QACF,SAAS,CAAC,SAAS,CAAC;YAClB,aAAa;YACb,oBAAoB;YACpB,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;YACf,kBAAkB;YAClB,MAAM;YACN,KAAK;YACL,gCAAgC;YAChC,eAAe;YACf,OAAO;SACR,CAAC,CAAC;KACJ;YAAS;QACR,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KACvC;AACH,CAAC,CAAC;AAnCW,QAAA,gBAAgB,oBAmC3B"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-transformer",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.4",
|
4
4
|
"description": "Amplify GraphQL Transformer Root Package",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -29,73 +29,32 @@
|
|
29
29
|
"access": "public"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@aws-amplify/graphql-auth-transformer": "4.1.
|
33
|
-
"@aws-amplify/graphql-conversation-transformer": "1.1.
|
34
|
-
"@aws-amplify/graphql-default-value-transformer": "3.1.
|
35
|
-
"@aws-amplify/graphql-function-transformer": "3.1.
|
36
|
-
"@aws-amplify/graphql-generation-transformer": "1.1.
|
37
|
-
"@aws-amplify/graphql-http-transformer": "3.0.
|
38
|
-
"@aws-amplify/graphql-index-transformer": "3.0.
|
39
|
-
"@aws-amplify/graphql-maps-to-transformer": "4.0.
|
40
|
-
"@aws-amplify/graphql-model-transformer": "3.1.
|
41
|
-
"@aws-amplify/graphql-predictions-transformer": "3.0.
|
42
|
-
"@aws-amplify/graphql-relational-transformer": "3.1.
|
43
|
-
"@aws-amplify/graphql-searchable-transformer": "3.0.
|
44
|
-
"@aws-amplify/graphql-sql-transformer": "0.4.
|
45
|
-
"@aws-amplify/graphql-transformer-core": "3.3.
|
46
|
-
"@aws-amplify/graphql-transformer-interfaces": "4.2.
|
32
|
+
"@aws-amplify/graphql-auth-transformer": "4.1.9",
|
33
|
+
"@aws-amplify/graphql-conversation-transformer": "1.1.4",
|
34
|
+
"@aws-amplify/graphql-default-value-transformer": "3.1.6",
|
35
|
+
"@aws-amplify/graphql-function-transformer": "3.1.8",
|
36
|
+
"@aws-amplify/graphql-generation-transformer": "1.1.2",
|
37
|
+
"@aws-amplify/graphql-http-transformer": "3.0.11",
|
38
|
+
"@aws-amplify/graphql-index-transformer": "3.0.11",
|
39
|
+
"@aws-amplify/graphql-maps-to-transformer": "4.0.11",
|
40
|
+
"@aws-amplify/graphql-model-transformer": "3.1.3",
|
41
|
+
"@aws-amplify/graphql-predictions-transformer": "3.0.11",
|
42
|
+
"@aws-amplify/graphql-relational-transformer": "3.1.3",
|
43
|
+
"@aws-amplify/graphql-searchable-transformer": "3.0.11",
|
44
|
+
"@aws-amplify/graphql-sql-transformer": "0.4.11",
|
45
|
+
"@aws-amplify/graphql-transformer-core": "3.3.3",
|
46
|
+
"@aws-amplify/graphql-transformer-interfaces": "4.2.1",
|
47
47
|
"@aws-amplify/plugin-types": "^1.0.0"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
50
|
-
"@aws-amplify/graphql-transformer-test-utils": "1.0.
|
50
|
+
"@aws-amplify/graphql-transformer-test-utils": "1.0.10",
|
51
51
|
"@types/node": "^18.0.0",
|
52
52
|
"fs-extra": "^8.1.0",
|
53
|
-
"rimraf": "^3.0.0"
|
54
|
-
"ts-jest": "^29.0.0"
|
53
|
+
"rimraf": "^3.0.0"
|
55
54
|
},
|
56
55
|
"peerDependencies": {
|
57
|
-
"aws-cdk-lib": "^2.
|
56
|
+
"aws-cdk-lib": "^2.168.0",
|
58
57
|
"constructs": "^10.3.0"
|
59
58
|
},
|
60
|
-
"
|
61
|
-
"testEnvironmentOptions": {
|
62
|
-
"url": "http://localhost"
|
63
|
-
},
|
64
|
-
"transform": {
|
65
|
-
"^.+\\.tsx?$": "ts-jest"
|
66
|
-
},
|
67
|
-
"testRegex": "((\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
68
|
-
"moduleFileExtensions": [
|
69
|
-
"ts",
|
70
|
-
"tsx",
|
71
|
-
"js",
|
72
|
-
"jsx",
|
73
|
-
"json",
|
74
|
-
"node"
|
75
|
-
],
|
76
|
-
"collectCoverage": true,
|
77
|
-
"coverageProvider": "v8",
|
78
|
-
"coverageThreshold": {
|
79
|
-
"global": {
|
80
|
-
"branches": 59,
|
81
|
-
"functions": 54,
|
82
|
-
"lines": 74
|
83
|
-
}
|
84
|
-
},
|
85
|
-
"coverageReporters": [
|
86
|
-
"clover",
|
87
|
-
"text"
|
88
|
-
],
|
89
|
-
"collectCoverageFrom": [
|
90
|
-
"src/**/*.ts"
|
91
|
-
],
|
92
|
-
"coveragePathIgnorePatterns": [
|
93
|
-
"/__tests__/"
|
94
|
-
],
|
95
|
-
"snapshotFormat": {
|
96
|
-
"escapeString": true,
|
97
|
-
"printBasicPrototype": true
|
98
|
-
}
|
99
|
-
},
|
100
|
-
"gitHead": "0a000c454da053608a1c150c3d617c7c09cc8ee7"
|
59
|
+
"gitHead": "a1ec8b0438f8177d3bde902a040f285bd78bc7cb"
|
101
60
|
}
|
@@ -29,6 +29,7 @@ import type {
|
|
29
29
|
RDSLayerMappingProvider,
|
30
30
|
RDSSNSTopicMappingProvider,
|
31
31
|
TransformParameters,
|
32
|
+
LogConfig,
|
32
33
|
} from '@aws-amplify/graphql-transformer-interfaces';
|
33
34
|
import { GraphQLTransform, ResolverConfig, UserDefinedSlot } from '@aws-amplify/graphql-transformer-core';
|
34
35
|
import { Construct } from 'constructs';
|
@@ -129,6 +130,7 @@ export type ExecuteTransformConfig = TransformConfig &
|
|
129
130
|
parameterProvider?: TransformParameterProvider;
|
130
131
|
assetProvider: AssetProvider;
|
131
132
|
synthParameters: SynthParameters;
|
133
|
+
logging?: true | LogConfig;
|
132
134
|
};
|
133
135
|
|
134
136
|
/**
|
@@ -172,6 +174,7 @@ export const executeTransform = (config: ExecuteTransformConfig): void => {
|
|
172
174
|
scope,
|
173
175
|
sqlDirectiveDataSourceStrategies,
|
174
176
|
synthParameters,
|
177
|
+
logging,
|
175
178
|
} = config;
|
176
179
|
|
177
180
|
const printLog = printTransformerLog ?? defaultPrintTransformerLog;
|
@@ -188,6 +191,7 @@ export const executeTransform = (config: ExecuteTransformConfig): void => {
|
|
188
191
|
scope,
|
189
192
|
sqlDirectiveDataSourceStrategies,
|
190
193
|
synthParameters,
|
194
|
+
logging,
|
191
195
|
});
|
192
196
|
} finally {
|
193
197
|
transform.getLogs().forEach(printLog);
|
@@ -49,7 +49,7 @@ import { InterfaceTypeDefinitionNode } from 'graphql';
|
|
49
49
|
import { InterfaceTypeExtensionNode } from 'graphql';
|
50
50
|
import { JSRuntimeTemplate } from '@aws-amplify/graphql-transformer-interfaces';
|
51
51
|
import { Location as Location_2 } from 'graphql';
|
52
|
-
import { LogConfig } from 'aws-
|
52
|
+
import { LogConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
53
53
|
import { MappingTemplateProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
54
54
|
import { ModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces';
|
55
55
|
import { ModelDataSourceStrategyDbType } from '@aws-amplify/graphql-transformer-interfaces';
|
@@ -332,7 +332,7 @@ export class GraphQLTransform {
|
|
332
332
|
// Warning: (ae-forgotten-export) The symbol "GraphQLApi" needs to be exported by the entry point index.d.ts
|
333
333
|
//
|
334
334
|
// (undocumented)
|
335
|
-
protected generateGraphQlApi(stackManager: StackManagerProvider, assetProvider: AssetProvider, synthParameters: SynthParameters, output: TransformerOutput, transformParameters: TransformParameters): GraphQLApi;
|
335
|
+
protected generateGraphQlApi(stackManager: StackManagerProvider, assetProvider: AssetProvider, synthParameters: SynthParameters, output: TransformerOutput, transformParameters: TransformParameters, logging?: true | LogConfig): GraphQLApi;
|
336
336
|
// (undocumented)
|
337
337
|
getLogs(): TransformerLog[];
|
338
338
|
// (undocumented)
|
@@ -340,7 +340,7 @@ export class GraphQLTransform {
|
|
340
340
|
// Warning: (ae-forgotten-export) The symbol "TransformOption" needs to be exported by the entry point index.d.ts
|
341
341
|
//
|
342
342
|
// (undocumented)
|
343
|
-
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, rdsSnsTopicMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, }: TransformOption): void;
|
343
|
+
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, rdsSnsTopicMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, logging, }: TransformOption): void;
|
344
344
|
}
|
345
345
|
|
346
346
|
// @public (undocumented)
|
@@ -3,6 +3,14 @@
|
|
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
|
+
## [3.3.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-core@3.3.2...@aws-amplify/graphql-transformer-core@3.3.3) (2024-12-23)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-transformer-core
|
9
|
+
|
10
|
+
## [3.3.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-core@3.3.1...@aws-amplify/graphql-transformer-core@3.3.2) (2024-12-17)
|
11
|
+
|
12
|
+
**Note:** Version bump only for package @aws-amplify/graphql-transformer-core
|
13
|
+
|
6
14
|
## [3.3.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-transformer-core@3.3.0...@aws-amplify/graphql-transformer-core@3.3.1) (2024-11-14)
|
7
15
|
|
8
16
|
**Note:** Version bump only for package @aws-amplify/graphql-transformer-core
|
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright 2017 - 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { AssetProvider, GraphQLAPIProvider, TransformHostProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
-
import { ApiKeyConfig, AuthorizationConfig, AuthorizationType, GraphqlApiBase,
|
1
|
+
import { AssetProvider, GraphQLAPIProvider, TransformHostProvider, LogConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
2
|
+
import { ApiKeyConfig, AuthorizationConfig, AuthorizationType, GraphqlApiBase, CfnApiKey, Visibility, IamResource } from 'aws-cdk-lib/aws-appsync';
|
3
3
|
import { Grant, IGrantable } from 'aws-cdk-lib/aws-iam';
|
4
4
|
import { CfnResource } from 'aws-cdk-lib';
|
5
5
|
import { Construct } from 'constructs';
|
@@ -7,7 +7,7 @@ import { TransformerSchema } from './cdk-compat/schema-asset';
|
|
7
7
|
export interface GraphqlApiProps {
|
8
8
|
readonly name: string;
|
9
9
|
readonly authorizationConfig?: AuthorizationConfig;
|
10
|
-
readonly
|
10
|
+
readonly logging?: true | LogConfig;
|
11
11
|
readonly schema?: TransformerSchema;
|
12
12
|
readonly xrayEnabled?: boolean;
|
13
13
|
}
|
@@ -54,5 +54,6 @@ export declare class GraphQLApi extends GraphqlApiBase implements GraphQLAPIProv
|
|
54
54
|
private setupLambdaConfig;
|
55
55
|
private lambdaArnKey;
|
56
56
|
private setupAdditionalAuthorizationModes;
|
57
|
+
private getAppSyncLogGroupName;
|
57
58
|
}
|
58
59
|
//# sourceMappingURL=graphql-api.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graphql-api.d.ts","sourceRoot":"","sources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,EAAE,MAAM,EAAE,GAAG,KAAK;IAIlE,YAAY,CAAC,MAAM,CAAC,EAAE,YAAY;IAYlC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIlC,uBAAuB;IAI9B,OAAO,CAAC,0BAA0B;IAiB3B,mBAAmB,CAAC,SAAS,EAAE,WAAW,GAAG,OAAO;IAK3D,OAAO,CAAC,cAAc;IA6BtB,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,iCAAiC;IAwBzC,OAAO,CAAC,sBAAsB;CAG/B"}
|
@@ -28,12 +28,13 @@ const aws_appsync_1 = require("aws-cdk-lib/aws-appsync");
|
|
28
28
|
const aws_iam_1 = require("aws-cdk-lib/aws-iam");
|
29
29
|
const cdk = __importStar(require("aws-cdk-lib"));
|
30
30
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
31
|
+
const aws_logs_1 = require("aws-cdk-lib/aws-logs");
|
31
32
|
const schema_asset_1 = require("./cdk-compat/schema-asset");
|
32
33
|
const transform_host_1 = require("./transform-host");
|
33
34
|
const utils_1 = require("./utils");
|
34
35
|
class GraphQLApi extends aws_appsync_1.GraphqlApiBase {
|
35
36
|
constructor(scope, id, props) {
|
36
|
-
var _a, _b;
|
37
|
+
var _a, _b, _c;
|
37
38
|
super(scope, id);
|
38
39
|
this.authorizationConfig = {
|
39
40
|
defaultAuthorization: { authorizationType: aws_appsync_1.AuthorizationType.API_KEY },
|
@@ -49,12 +50,12 @@ class GraphQLApi extends aws_appsync_1.GraphqlApiBase {
|
|
49
50
|
this.api = new aws_appsync_1.CfnGraphQLApi(this, 'Resource', {
|
50
51
|
name: props.name,
|
51
52
|
authenticationType: defaultMode.authorizationType,
|
52
|
-
logConfig: this.setupLogConfig(props.logConfig),
|
53
53
|
openIdConnectConfig: this.setupOpenIdConnectConfig(defaultMode.openIdConnectConfig),
|
54
54
|
userPoolConfig: this.setupUserPoolConfig(defaultMode.userPoolConfig),
|
55
55
|
lambdaAuthorizerConfig: this.setupLambdaConfig(defaultMode.lambdaAuthorizerConfig),
|
56
56
|
additionalAuthenticationProviders: this.setupAdditionalAuthorizationModes(additionalModes),
|
57
57
|
xrayEnabled: props.xrayEnabled,
|
58
|
+
logConfig: this.setupLogConfig(props.logging),
|
58
59
|
});
|
59
60
|
this.apiId = this.api.attrApiId;
|
60
61
|
this.arn = this.api.attrArn;
|
@@ -85,6 +86,14 @@ class GraphQLApi extends aws_appsync_1.GraphqlApiBase {
|
|
85
86
|
api: this,
|
86
87
|
});
|
87
88
|
}
|
89
|
+
if (props.logging) {
|
90
|
+
const defaultRetention = aws_logs_1.RetentionDays.ONE_WEEK;
|
91
|
+
const retention = props.logging === true ? defaultRetention : (_c = props.logging.retention) !== null && _c !== void 0 ? _c : defaultRetention;
|
92
|
+
new aws_logs_1.LogRetention(this, 'LogRetention', {
|
93
|
+
logGroupName: this.getAppSyncLogGroupName(),
|
94
|
+
retention: retention,
|
95
|
+
});
|
96
|
+
}
|
88
97
|
}
|
89
98
|
grant(grantee, resources, ...actions) {
|
90
99
|
return aws_iam_1.Grant.addToPrincipal({
|
@@ -142,10 +151,18 @@ class GraphQLApi extends aws_appsync_1.GraphqlApiBase {
|
|
142
151
|
construct.addDependency(this.schemaResource);
|
143
152
|
return true;
|
144
153
|
}
|
145
|
-
setupLogConfig(
|
146
|
-
|
154
|
+
setupLogConfig(logging) {
|
155
|
+
var _a, _b;
|
156
|
+
if (!logging)
|
147
157
|
return undefined;
|
148
|
-
|
158
|
+
const defaultExcludeVerboseContent = true;
|
159
|
+
const defaultFieldLogLevel = aws_appsync_1.FieldLogLevel.NONE;
|
160
|
+
const excludeVerboseContent = logging === true || (typeof logging === 'object' && Object.keys(logging).length === 0)
|
161
|
+
? defaultExcludeVerboseContent
|
162
|
+
: (_a = logging.excludeVerboseContent) !== null && _a !== void 0 ? _a : defaultExcludeVerboseContent;
|
163
|
+
const fieldLogLevel = logging === true || (typeof logging === 'object' && Object.keys(logging).length === 0)
|
164
|
+
? defaultFieldLogLevel
|
165
|
+
: (_b = logging.fieldLogLevel) !== null && _b !== void 0 ? _b : defaultFieldLogLevel;
|
149
166
|
const role = new aws_iam_1.Role(this, 'ApiLogsRole', {
|
150
167
|
assumedBy: new aws_iam_1.ServicePrincipal('appsync.amazonaws.com'),
|
151
168
|
managedPolicies: [aws_iam_1.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSAppSyncPushToCloudWatchLogs')],
|
@@ -153,8 +170,8 @@ class GraphQLApi extends aws_appsync_1.GraphqlApiBase {
|
|
153
170
|
(0, utils_1.setResourceName)(role, { name: 'ApiLogsRole', setOnDefaultChild: true });
|
154
171
|
return {
|
155
172
|
cloudWatchLogsRoleArn: role.roleArn,
|
156
|
-
excludeVerboseContent
|
157
|
-
fieldLogLevel
|
173
|
+
excludeVerboseContent,
|
174
|
+
fieldLogLevel,
|
158
175
|
};
|
159
176
|
}
|
160
177
|
setupOpenIdConnectConfig(config) {
|
@@ -206,6 +223,9 @@ class GraphQLApi extends aws_appsync_1.GraphqlApiBase {
|
|
206
223
|
},
|
207
224
|
], []);
|
208
225
|
}
|
226
|
+
getAppSyncLogGroupName() {
|
227
|
+
return `/aws/appsync/apis/${this.apiId}`;
|
228
|
+
}
|
209
229
|
}
|
210
230
|
exports.GraphQLApi = GraphQLApi;
|
211
231
|
//# sourceMappingURL=graphql-api.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graphql-api.js","sourceRoot":"","sources":["../src/graphql-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yDAeiC;AACjC,iDAA+F;AAC/F,iDAAmC;AACnC,6CAAsE;AAEtE,4DAA8D;AAC9D,qDAAwD;AACxD,mCAA0C;AA4C1C,MAAa,UAAW,SAAQ,4BAAc;IAqF5C,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA0B;;QAClE,K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CACH,CAAC;IACJ,CAAC;IAUO,sBAAsB;QAC5B,OAAO,qBAAqB,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3C,CAAC;CACF;AA1UD,gCA0UC"}
|
package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformHostProvider, TransformerLog, NestedStackProvider, SynthParameters } from '@aws-amplify/graphql-transformer-interfaces';
|
1
|
+
import { AppSyncAuthConfiguration, TransformerPluginProvider, TransformHostProvider, TransformerLog, NestedStackProvider, SynthParameters, LogConfig } from '@aws-amplify/graphql-transformer-interfaces';
|
2
2
|
import type { AssetProvider, StackManagerProvider, TransformParameterProvider, TransformParameters, DataSourceStrategiesProvider, RDSLayerMappingProvider, RDSSNSTopicMappingProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
3
3
|
import { DocumentNode } from 'graphql/language';
|
4
4
|
import { Construct } from 'constructs';
|
@@ -22,6 +22,7 @@ export interface TransformOption extends DataSourceStrategiesProvider, RDSLayerM
|
|
22
22
|
assetProvider: AssetProvider;
|
23
23
|
synthParameters: SynthParameters;
|
24
24
|
schema: string;
|
25
|
+
logging?: true | LogConfig;
|
25
26
|
}
|
26
27
|
export type StackMapping = {
|
27
28
|
[resourceId: string]: string;
|
@@ -38,8 +39,8 @@ export declare class GraphQLTransform {
|
|
38
39
|
private logs;
|
39
40
|
constructor(options: GraphQLTransformOptions);
|
40
41
|
preProcessSchema(schema: DocumentNode): DocumentNode;
|
41
|
-
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, rdsSnsTopicMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, }: TransformOption): void;
|
42
|
-
protected generateGraphQlApi(stackManager: StackManagerProvider, assetProvider: AssetProvider, synthParameters: SynthParameters, output: TransformerOutput, transformParameters: TransformParameters): GraphQLApi;
|
42
|
+
transform({ assetProvider, dataSourceStrategies, nestedStackProvider, parameterProvider, rdsLayerMapping, rdsSnsTopicMapping, schema, scope, sqlDirectiveDataSourceStrategies, synthParameters, logging, }: TransformOption): void;
|
43
|
+
protected generateGraphQlApi(stackManager: StackManagerProvider, assetProvider: AssetProvider, synthParameters: SynthParameters, output: TransformerOutput, transformParameters: TransformParameters, logging?: true | LogConfig): GraphQLApi;
|
43
44
|
private collectResolvers;
|
44
45
|
private transformObject;
|
45
46
|
private transformField;
|
package/node_modules/@aws-amplify/graphql-transformer-core/lib/transformation/transform.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/transformation/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,eAAe,
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/transformation/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,SAAS,EACV,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,6CAA6C,CAAC;AAmBrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMlE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA4B1C,MAAM,WAAW,uBAAuB;IACtC,Q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