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

@aws-amplify/graphql-searchable-transformer

Package Overview
Dependencies
Maintainers
6
Versions
440
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/graphql-searchable-transformer - npm Package Compare versions

Comparing version 0.2.2-flutter-preview.26 to 0.2.2-flutter-preview.27

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## [0.2.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.2.1...@aws-amplify/graphql-searchable-transformer@0.2.2) (2021-06-24)
### Bug Fixes
* remove extra $ output of model transformer v2 ([#7415](https://github.com/aws-amplify/amplify-cli/issues/7415)) ([a8680a2](https://github.com/aws-amplify/amplify-cli/commit/a8680a2c94d86b6b3fb29cf9b7e04ba8680b907b))
* **graphql-transformer-common:** improve generated graphql pluralization ([#7258](https://github.com/aws-amplify/amplify-cli/issues/7258)) ([fc3ad0d](https://github.com/aws-amplify/amplify-cli/commit/fc3ad0dd5a12a7912c59ae12024f593b4cdf7f2d)), closes [#4224](https://github.com/aws-amplify/amplify-cli/issues/4224)
## [0.2.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.2.0...@aws-amplify/graphql-searchable-transformer@0.2.1) (2021-05-26)

@@ -8,0 +20,0 @@

4

lib/graphql-searchable-transformer.js

@@ -84,3 +84,5 @@ "use strict";

}
const fieldName = searchFieldNameOverride ? searchFieldNameOverride : graphql_transformer_common_1.graphqlName(`search${graphql_transformer_common_1.plurality(graphql_transformer_common_1.toUpper(definition.name.value))}`);
const fieldName = searchFieldNameOverride
? searchFieldNameOverride
: graphql_transformer_common_1.graphqlName(`search${graphql_transformer_common_1.plurality(graphql_transformer_common_1.toUpper(definition.name.value), ctx.featureFlags.getBoolean('improvePluralization'))}`);
this.searchableObjectTypeDefinitions.push({

@@ -87,0 +89,0 @@ node: definition,

{
"name": "@aws-amplify/graphql-searchable-transformer",
"version": "0.2.2-flutter-preview.26+def25777c",
"version": "0.2.2-flutter-preview.27+37710261c",
"description": "Amplfy GraphQL @searchable transformer",

@@ -30,4 +30,4 @@ "repository": {

"dependencies": {
"@aws-amplify/graphql-transformer-core": "0.6.2-flutter-preview.26+def25777c",
"@aws-amplify/graphql-transformer-interfaces": "1.6.1-flutter-preview.41+def25777c",
"@aws-amplify/graphql-transformer-core": "0.6.2-flutter-preview.27+37710261c",
"@aws-amplify/graphql-transformer-interfaces": "1.6.1-flutter-preview.42+37710261c",
"@aws-cdk/aws-appsync": "~1.72.0",

@@ -41,4 +41,4 @@ "@aws-cdk/aws-dynamodb": "~1.72.0",

"graphql": "^14.5.8",
"graphql-mapping-template": "4.18.2-flutter-preview.572+def25777c",
"graphql-transformer-common": "4.19.4-flutter-preview.96+def25777c"
"graphql-mapping-template": "4.18.2-flutter-preview.573+37710261c",
"graphql-transformer-common": "4.19.4-flutter-preview.97+37710261c"
},

@@ -66,3 +66,3 @@ "devDependencies": {

},
"gitHead": "def25777c52cacff0da7849e19dcae8428b84fcc"
"gitHead": "37710261cd3f413a2922982998eff635e8425041"
}

@@ -6,2 +6,13 @@ import { GraphQLTransform } from '@aws-amplify/graphql-transformer-core';

import { parse } from 'graphql';
const featureFlags = {
getBoolean: jest.fn().mockImplementation((name, defaultValue) => {
if (name === 'improvePluralization') {
return true;
}
return;
}),
getNumber: jest.fn(),
getObject: jest.fn(),
getString: jest.fn(),
};

@@ -19,2 +30,3 @@ test('Test SearchableModelTransformer validation happy case', () => {

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -38,2 +50,3 @@ const out = transformer.transform(validSchema);

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -56,2 +69,3 @@

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -74,2 +88,3 @@ const out = transformer.transform(validSchema);

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -98,2 +113,3 @@ const out = transformer.transform(validSchema);

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -117,2 +133,3 @@ const out = transformer.transform(validSchema);

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -147,2 +164,3 @@ const out = transformer.transform(validSchema);

transformers: [new ModelTransformer(), new SearchableModelTransformer()],
featureFlags,
});

@@ -149,0 +167,0 @@ const out = transformer.transform(validSchema);

@@ -161,3 +161,5 @@ import { TransformerPluginBase, InvalidDirectiveError, MappingTemplate, DirectiveWrapper } from '@aws-amplify/graphql-transformer-core';

}
const fieldName = searchFieldNameOverride ? searchFieldNameOverride : graphqlName(`search${plurality(toUpper(definition.name.value))}`);
const fieldName = searchFieldNameOverride
? searchFieldNameOverride
: graphqlName(`search${plurality(toUpper(definition.name.value), ctx.featureFlags.getBoolean('improvePluralization'))}`);
this.searchableObjectTypeDefinitions.push({

@@ -164,0 +166,0 @@ node: definition,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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