@aws-amplify/graphql-default-value-transformer
Advanced tools
Comparing version 2.1.5 to 2.1.6-rds-3.0
@@ -6,2 +6,8 @@ # Change Log | ||
## [2.1.6-rds-3.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-default-value-transformer@2.1.5...@aws-amplify/graphql-default-value-transformer@2.1.6-rds-3.0) (2023-10-03) | ||
### Bug Fixes | ||
- **graphql:** disable default value validation for rds ([8cd3b26](https://github.com/aws-amplify/amplify-category-api/commit/8cd3b26d24a5553104267ce8f597d7d4701246f0)) | ||
## [2.1.5](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-default-value-transformer@2.1.4...@aws-amplify/graphql-default-value-transformer@2.1.5) (2023-10-02) | ||
@@ -8,0 +14,0 @@ |
@@ -51,4 +51,12 @@ "use strict"; | ||
validateDirectiveArguments(config.directive); | ||
validateDefaultValueType(ctx, config); | ||
const isDynamoDB = isDynamoDBDatasource(ctx, config.object.name.value); | ||
if (isDynamoDB) { | ||
validateDefaultValueType(ctx, config); | ||
} | ||
}; | ||
const isDynamoDBDatasource = (ctx, modelName) => { | ||
var _a, _b; | ||
const isDynamoDB = ((_b = (_a = ctx.modelToDatasourceMap.get(modelName)) === null || _a === void 0 ? void 0 : _a.dbType) !== null && _b !== void 0 ? _b : graphql_transformer_core_1.DDB_DB_TYPE) === graphql_transformer_core_1.DDB_DB_TYPE; | ||
return isDynamoDB; | ||
}; | ||
class DefaultValueTransformer extends graphql_transformer_core_1.TransformerPluginBase { | ||
@@ -84,2 +92,6 @@ constructor() { | ||
for (const typeName of this.directiveMap.keys()) { | ||
const isDynamoDB = isDynamoDBDatasource(ctx, typeName); | ||
if (!isDynamoDB) { | ||
continue; | ||
} | ||
const snippets = []; | ||
@@ -86,0 +98,0 @@ for (const config of this.directiveMap.get(typeName)) { |
{ | ||
"name": "@aws-amplify/graphql-default-value-transformer", | ||
"version": "2.1.5", | ||
"version": "2.1.6-rds-3.0", | ||
"description": "Amplify GraphQL default value transformer", | ||
@@ -32,12 +32,12 @@ "repository": { | ||
"dependencies": { | ||
"@aws-amplify/graphql-transformer-core": "2.2.1", | ||
"@aws-amplify/graphql-transformer-interfaces": "3.2.0", | ||
"@aws-amplify/graphql-transformer-core": "2.3.0-rds-3.0", | ||
"@aws-amplify/graphql-transformer-interfaces": "3.3.0-rds-3.0", | ||
"graphql": "^15.5.0", | ||
"graphql-mapping-template": "4.20.12", | ||
"graphql-transformer-common": "4.25.1", | ||
"graphql-mapping-template": "4.20.13-rds-3.0", | ||
"graphql-transformer-common": "4.26.0-rds-3.0", | ||
"libphonenumber-js": "1.9.47" | ||
}, | ||
"devDependencies": { | ||
"@aws-amplify/graphql-model-transformer": "2.2.1", | ||
"@aws-amplify/graphql-transformer-test-utils": "0.2.4" | ||
"@aws-amplify/graphql-model-transformer": "2.3.0-rds-3.0", | ||
"@aws-amplify/graphql-transformer-test-utils": "0.3.0-rds-3.0" | ||
}, | ||
@@ -67,3 +67,3 @@ "jest": { | ||
}, | ||
"gitHead": "26c697f3dcd421267e0c80e1125a2232036f3a2e" | ||
"gitHead": "c1efd4e687969d2cb64361ee656b7ce99a5eebb8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67047
303
2
+ Added@aws-amplify/graphql-transformer-core@2.3.0-rds-3.0(transitive)
+ Added@aws-amplify/graphql-transformer-interfaces@3.3.0-rds-3.0(transitive)
+ Addedgraphql-mapping-template@4.20.13-rds-3.0(transitive)
+ Addedgraphql-transformer-common@4.26.0-rds-3.0(transitive)
- Removed@aws-amplify/graphql-transformer-core@2.2.1(transitive)
- Removed@aws-amplify/graphql-transformer-interfaces@3.2.0(transitive)
- Removedgraphql-mapping-template@4.20.12(transitive)
- Removedgraphql-transformer-common@4.25.1(transitive)
Updated@aws-amplify/graphql-transformer-interfaces@3.3.0-rds-3.0