@aws-amplify/graphql-searchable-transformer
Advanced tools
Comparing version 0.10.0-gql-ext2.0 to 0.10.0
@@ -6,19 +6,43 @@ # Change Log | ||
# [0.10.0-gql-ext2.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.9.2...@aws-amplify/graphql-searchable-transformer@0.10.0-gql-ext2.0) (2021-11-19) | ||
# [0.10.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.9.5...@aws-amplify/graphql-searchable-transformer@0.10.0) (2021-11-23) | ||
### Features | ||
* override support for api category ([#9013](https://github.com/aws-amplify/amplify-cli/issues/9013)) ([ae7b001](https://github.com/aws-amplify/amplify-cli/commit/ae7b001f274f327a29c99c67fe851272c6208e84)), closes [#9001](https://github.com/aws-amplify/amplify-cli/issues/9001) [#8954](https://github.com/aws-amplify/amplify-cli/issues/8954) [#8958](https://github.com/aws-amplify/amplify-cli/issues/8958) [#8960](https://github.com/aws-amplify/amplify-cli/issues/8960) [#8967](https://github.com/aws-amplify/amplify-cli/issues/8967) [#8971](https://github.com/aws-amplify/amplify-cli/issues/8971) [#8976](https://github.com/aws-amplify/amplify-cli/issues/8976) [#8975](https://github.com/aws-amplify/amplify-cli/issues/8975) [#8981](https://github.com/aws-amplify/amplify-cli/issues/8981) [#8983](https://github.com/aws-amplify/amplify-cli/issues/8983) [#8992](https://github.com/aws-amplify/amplify-cli/issues/8992) [#9000](https://github.com/aws-amplify/amplify-cli/issues/9000) [#9002](https://github.com/aws-amplify/amplify-cli/issues/9002) [#9005](https://github.com/aws-amplify/amplify-cli/issues/9005) [#9006](https://github.com/aws-amplify/amplify-cli/issues/9006) [#9007](https://github.com/aws-amplify/amplify-cli/issues/9007) [#9008](https://github.com/aws-amplify/amplify-cli/issues/9008) [#9010](https://github.com/aws-amplify/amplify-cli/issues/9010) [#9011](https://github.com/aws-amplify/amplify-cli/issues/9011) [#9012](https://github.com/aws-amplify/amplify-cli/issues/9012) [#9014](https://github.com/aws-amplify/amplify-cli/issues/9014) [#9015](https://github.com/aws-amplify/amplify-cli/issues/9015) [#9017](https://github.com/aws-amplify/amplify-cli/issues/9017) [#9020](https://github.com/aws-amplify/amplify-cli/issues/9020) [#9024](https://github.com/aws-amplify/amplify-cli/issues/9024) [#9027](https://github.com/aws-amplify/amplify-cli/issues/9027) [#9028](https://github.com/aws-amplify/amplify-cli/issues/9028) [#9029](https://github.com/aws-amplify/amplify-cli/issues/9029) [#9032](https://github.com/aws-amplify/amplify-cli/issues/9032) [#9031](https://github.com/aws-amplify/amplify-cli/issues/9031) [#9035](https://github.com/aws-amplify/amplify-cli/issues/9035) [#9038](https://github.com/aws-amplify/amplify-cli/issues/9038) [#9039](https://github.com/aws-amplify/amplify-cli/issues/9039) | ||
## [0.9.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.9.4...@aws-amplify/graphql-searchable-transformer@0.9.5) (2021-11-21) | ||
**Note:** Version bump only for package @aws-amplify/graphql-searchable-transformer | ||
## [0.9.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.9.2...@aws-amplify/graphql-searchable-transformer@0.9.4) (2021-11-19) | ||
### Bug Fixes | ||
* rebase with gql release branch ([d4ea92f](https://github.com/aws-amplify/amplify-cli/commit/d4ea92fa5789246866c0369a0ce040059ffb9bfc)) | ||
* update gitignore to include test files ([2cc2497](https://github.com/aws-amplify/amplify-cli/commit/2cc2497025018c4370cdb42ed56b40fdb8c3015d)) | ||
* **graphql:** use output type definition to generate searchable filter ([#8934](https://github.com/aws-amplify/amplify-cli/issues/8934)) ([ff214be](https://github.com/aws-amplify/amplify-cli/commit/ff214befba58a1cc8ce0a0908b3b1581ae3fffe4)) | ||
### Features | ||
* add unit tests and e2e ([4b81d1b](https://github.com/aws-amplify/amplify-cli/commit/4b81d1b1abd6662908638bb102ce37411042766b)) | ||
## [0.9.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.9.2...@aws-amplify/graphql-searchable-transformer@0.9.3) (2021-11-19) | ||
### Bug Fixes | ||
* **graphql:** use output type definition to generate searchable filter ([#8934](https://github.com/aws-amplify/amplify-cli/issues/8934)) ([ff214be](https://github.com/aws-amplify/amplify-cli/commit/ff214befba58a1cc8ce0a0908b3b1581ae3fffe4)) | ||
## [0.9.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-searchable-transformer@0.9.1...@aws-amplify/graphql-searchable-transformer@0.9.2) (2021-11-17) | ||
@@ -25,0 +49,0 @@ |
@@ -9,2 +9,3 @@ import { TransformerPluginBase } from '@aws-amplify/graphql-transformer-core'; | ||
}[]; | ||
searchableObjectNames: string[]; | ||
constructor(); | ||
@@ -11,0 +12,0 @@ generateResolvers: (context: TransformerContextProvider) => void; |
@@ -97,3 +97,3 @@ "use strict"; | ||
if (shouldMakeSearch) { | ||
this.generateSearchableInputs(ctx, definition); | ||
this.searchableObjectNames.push(definition.name.value); | ||
this.generateSearchableXConnectionType(ctx, definition); | ||
@@ -118,2 +118,6 @@ this.generateSearchableAggregateTypes(ctx); | ||
var _a, _b; | ||
for (const name of this.searchableObjectNames) { | ||
const searchObject = ctx.output.getObject(name); | ||
this.generateSearchableInputs(ctx, searchObject); | ||
} | ||
if (ctx.sandboxModeEnabled && ctx.authConfig.defaultAuthentication.authenticationType !== 'API_KEY') { | ||
@@ -130,2 +134,3 @@ for (let aggType of definitions_1.AGGREGATE_TYPES) { | ||
this.searchableObjectTypeDefinitions = []; | ||
this.searchableObjectNames = []; | ||
} | ||
@@ -132,0 +137,0 @@ generateSearchableXConnectionType(ctx, definition) { |
{ | ||
"name": "@aws-amplify/graphql-searchable-transformer", | ||
"version": "0.10.0-gql-ext2.0", | ||
"version": "0.10.0", | ||
"description": "Amplfy GraphQL @searchable transformer", | ||
@@ -30,4 +30,4 @@ "repository": { | ||
"dependencies": { | ||
"@aws-amplify/graphql-transformer-core": "0.14.0-gql-ext2.0", | ||
"@aws-amplify/graphql-transformer-interfaces": "1.12.2", | ||
"@aws-amplify/graphql-transformer-core": "0.14.0", | ||
"@aws-amplify/graphql-transformer-interfaces": "1.12.3", | ||
"@aws-cdk/aws-appsync": "~1.124.0", | ||
@@ -68,3 +68,3 @@ "@aws-cdk/aws-dynamodb": "~1.124.0", | ||
}, | ||
"gitHead": "8911be95c79749ceeb9bf55b2936b7a211ff92bb" | ||
"gitHead": "3c694594b4a6490db051b4f104cf19b9a37e1ef4" | ||
} |
function override(resource) { | ||
/* TODO: Add snippet of how to override in comments */ | ||
resource.opensearch.OpenSearchDomain.encryptionAtRestOptions = { | ||
@@ -4,0 +3,0 @@ enabled: true, |
@@ -58,2 +58,3 @@ import { TransformerPluginBase, InvalidDirectiveError, MappingTemplate, DirectiveWrapper } from '@aws-amplify/graphql-transformer-core'; | ||
searchableObjectTypeDefinitions: { node: ObjectTypeDefinitionNode; fieldName: string }[]; | ||
searchableObjectNames: string[]; | ||
constructor() { | ||
@@ -70,2 +71,3 @@ super( | ||
this.searchableObjectTypeDefinitions = []; | ||
this.searchableObjectNames = []; | ||
} | ||
@@ -194,3 +196,3 @@ | ||
if (shouldMakeSearch) { | ||
this.generateSearchableInputs(ctx, definition); | ||
this.searchableObjectNames.push(definition.name.value); | ||
this.generateSearchableXConnectionType(ctx, definition); | ||
@@ -220,2 +222,6 @@ this.generateSearchableAggregateTypes(ctx); | ||
transformSchema = (ctx: TransformerTransformSchemaStepContextProvider) => { | ||
for (const name of this.searchableObjectNames) { | ||
const searchObject = ctx.output.getObject(name) as ObjectTypeDefinitionNode; | ||
this.generateSearchableInputs(ctx, searchObject); | ||
} | ||
// add api key to aggregate types if sandbox mode is enabled | ||
@@ -222,0 +228,0 @@ if (ctx.sandboxModeEnabled && ctx.authConfig.defaultAuthentication.authenticationType !== 'API_KEY') { |
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
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
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
427367
3052
+ Added@aws-amplify/graphql-transformer-core@0.14.0(transitive)
+ Added@aws-amplify/graphql-transformer-interfaces@1.12.3(transitive)
+ Addedamplify-prompts@1.6.0(transitive)
- Removed@aws-amplify/graphql-transformer-core@0.14.0-gql-ext2.0(transitive)
- Removed@aws-amplify/graphql-transformer-interfaces@1.12.2(transitive)
- Removedamplify-prompts@1.6.3(transitive)