Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-amplify/graphql-default-value-transformer

Package Overview
Dependencies
Maintainers
10
Versions
382
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/graphql-default-value-transformer - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6-rds-3.0

6

CHANGELOG.md

@@ -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 @@

14

lib/graphql-default-value-transformer.js

@@ -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)) {

16

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc