Skip to content

Commit

Permalink
Merge branch 'main' into rds-merge-main-preview2
Browse files Browse the repository at this point in the history
  • Loading branch information
sundersc committed Sep 20, 2023
2 parents 18e0926 + c6772cf commit d95a038
Show file tree
Hide file tree
Showing 70 changed files with 698 additions and 272 deletions.
6 changes: 6 additions & 0 deletions packages/amplify-category-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.7.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/[email protected]...@aws-amplify/[email protected]) (2023-09-20)

### Features

- disable amplify cfn outputs for cdk apps ([0c72d18](https://github.com/aws-amplify/amplify-category-api/commit/0c72d1822f8e5ccb3e04a0a49049a459b5fb49e6))

## [5.6.4](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/[email protected]...@aws-amplify/[email protected]) (2023-09-13)

**Note:** Version bump only for package @aws-amplify/amplify-category-api
Expand Down
16 changes: 8 additions & 8 deletions packages/amplify-category-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/amplify-category-api",
"version": "5.6.4",
"version": "5.7.0",
"description": "Amplify CLI API Category Plugin",
"repository": {
"type": "git",
Expand Down Expand Up @@ -29,12 +29,12 @@
"access": "public"
},
"dependencies": {
"@aws-amplify/graphql-auth-transformer": "3.1.3",
"@aws-amplify/graphql-schema-generator": "0.4.3",
"@aws-amplify/graphql-transformer": "1.1.4",
"@aws-amplify/graphql-transformer-core": "2.1.2",
"@aws-amplify/graphql-transformer-interfaces": "3.1.2",
"@aws-amplify/graphql-transformer-migrator": "2.2.2",
"@aws-amplify/graphql-auth-transformer": "3.1.4",
"@aws-amplify/graphql-schema-generator": "0.4.4",
"@aws-amplify/graphql-transformer": "1.2.0",
"@aws-amplify/graphql-transformer-core": "2.2.0",
"@aws-amplify/graphql-transformer-interfaces": "3.2.0",
"@aws-amplify/graphql-transformer-migrator": "2.2.3",
"@aws-cdk/aws-apigatewayv2-alpha": "~2.80.0-alpha.0",
"@aws-sdk/client-iam": "3.338.0",
"@aws-sdk/client-lambda": "3.338.0",
Expand Down Expand Up @@ -79,7 +79,7 @@
"constructs": "^10.0.5"
},
"devDependencies": {
"@aws-amplify/graphql-transformer-test-utils": "0.2.2",
"@aws-amplify/graphql-transformer-test-utils": "0.2.3",
"@types/js-yaml": "^4.0.0",
"@types/node": "^12.12.6",
"amplify-util-headless-input": "^1.9.14-aug-transformer-mv-bump.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ const generateTransformParameters = (
pathManager.getCurrentCloudBackendDirPath(),
),
sandboxModeEnabled,
enableTransformerCfnOutputs: true,
};
};

Expand Down
6 changes: 6 additions & 0 deletions packages/amplify-e2e-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [3.15.1](https://github.com/aws-amplify/amplify-category-api/compare/amplify-category-api-e2e-tests@[email protected]) (2023-09-20)

### Bug Fixes

- update cdk e2e tests to use the updated outputs ([dd018de](https://github.com/aws-amplify/amplify-category-api/commit/dd018de774b0edea891c19dee3e30aedb8edb0dd))

# [3.15.0](https://github.com/aws-amplify/amplify-category-api/compare/amplify-category-api-e2e-tests@[email protected]) (2023-09-13)

### Features
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amplify-category-api-e2e-tests",
"version": "3.15.0",
"version": "3.15.1",
"description": "E2e test suite",
"repository": {
"type": "git",
Expand All @@ -25,7 +25,7 @@
},
"dependencies": {
"@aws-amplify/amplify-app": "^5.0.14-aug-transformer-mv-bump.0",
"@aws-amplify/graphql-transformer-core": "2.1.2",
"@aws-amplify/graphql-transformer-core": "2.2.0",
"amplify-category-api-e2e-core": "4.3.0",
"aws-amplify": "^4.2.8",
"aws-appsync": "^4.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('CDK GraphQL Transformer', () => {
const templatePath = path.resolve(path.join(__dirname, 'backends', 'base-cdk'));
const name = await initCDKProject(projRoot, templatePath, cdkVersion);
const outputs = await cdkDeploy(projRoot, '--all');
const { GraphQLAPIEndpointOutput: apiEndpoint, GraphQLAPIKeyOutput: apiKey } = outputs[name];
const { awsAppsyncApiEndpoint: apiEndpoint, awsAppsyncApiKey: apiKey } = outputs[name];

const result = await graphql(
apiEndpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('CDK GraphQL Transformer - Custom Logic', () => {
const templatePath = path.resolve(path.join(__dirname, 'backends', 'custom-logic'));
const name = await initCDKProject(projRoot, templatePath);
const outputs = await cdkDeploy(projRoot, '--all');
apiEndpoint = outputs[name].GraphQLAPIEndpointOutput;
apiKey = outputs[name].GraphQLAPIKeyOutput;
apiEndpoint = outputs[name].awsAppsyncApiEndpoint;
apiKey = outputs[name].awsAppsyncApiKey;
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('CDK GraphQL Transformer - Relationships', () => {
const templatePath = path.resolve(path.join(__dirname, 'backends', 'relationships'));
const name = await initCDKProject(projRoot, templatePath);
const outputs = await cdkDeploy(projRoot, '--all');
apiEndpoint = outputs[name].GraphQLAPIEndpointOutput;
apiKey = outputs[name].GraphQLAPIKeyOutput;
apiEndpoint = outputs[name].awsAppsyncApiEndpoint;
apiKey = outputs[name].awsAppsyncApiKey;
});

/**
Expand Down
215 changes: 135 additions & 80 deletions packages/amplify-graphql-api-construct/.jsii

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/amplify-graphql-api-construct/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export interface PartialSchemaTranslationBehavior {
readonly disableResolverDeduping?: boolean;
readonly enableAutoIndexQueryNames?: boolean;
readonly enableSearchNodeToNodeEncryption?: boolean;
readonly enableTransformerCfnOutputs?: boolean;
readonly populateOwnerFieldForStaticGroupAuth?: boolean;
readonly respectPrimaryKeyAttributesOnConnectionField?: boolean;
readonly sandboxModeEnabled?: boolean;
Expand All @@ -225,6 +226,7 @@ export interface SchemaTranslationBehavior {
readonly disableResolverDeduping: boolean;
readonly enableAutoIndexQueryNames: boolean;
readonly enableSearchNodeToNodeEncryption: boolean;
readonly enableTransformerCfnOutputs: boolean;
readonly populateOwnerFieldForStaticGroupAuth: boolean;
readonly respectPrimaryKeyAttributesOnConnectionField: boolean;
readonly sandboxModeEnabled: boolean;
Expand Down
7 changes: 7 additions & 0 deletions packages/amplify-graphql-api-construct/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.8.0](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/[email protected]...@aws-amplify/[email protected]) (2023-09-20)

### Features

- add amplify metadata to stack description if none is provided ([58266f1](https://github.com/aws-amplify/amplify-category-api/commit/58266f108e47334e39cf5d278499e447e3fbe086))
- disable amplify cfn outputs for cdk apps ([0c72d18](https://github.com/aws-amplify/amplify-category-api/commit/0c72d1822f8e5ccb3e04a0a49049a459b5fb49e6))

## [0.7.1](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/[email protected]...@aws-amplify/[email protected]) (2023-09-14)

**Note:** Version bump only for package @aws-amplify/graphql-construct-alpha
Expand Down
48 changes: 48 additions & 0 deletions packages/amplify-graphql-api-construct/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,7 @@ const partialSchemaTranslationBehavior: PartialSchemaTranslationBehavior = { ...
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.disableResolverDeduping">disableResolverDeduping</a></code> | <code>boolean</code> | Disable resolver deduping, this can sometimes cause problems because dedupe ordering isn't stable today, which can lead to circular dependencies across stacks if models are reordered. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.enableAutoIndexQueryNames">enableAutoIndexQueryNames</a></code> | <code>boolean</code> | Automate generation of query names, and as a result attaching all indexes as queries to the generated API. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.enableSearchNodeToNodeEncryption">enableSearchNodeToNodeEncryption</a></code> | <code>boolean</code> | If enabled, set nodeToNodeEncryption on the searchable domain (if one exists). |
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.enableTransformerCfnOutputs">enableTransformerCfnOutputs</a></code> | <code>boolean</code> | When enabled, internal cfn outputs which existed in Amplify-generated apps will continue to be emitted. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.populateOwnerFieldForStaticGroupAuth">populateOwnerFieldForStaticGroupAuth</a></code> | <code>boolean</code> | Ensure that the owner field is still populated even if a static iam or group authorization applies. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.respectPrimaryKeyAttributesOnConnectionField">respectPrimaryKeyAttributesOnConnectionField</a></code> | <code>boolean</code> | Enable custom primary key support, there's no good reason to disable this unless trying not to update a legacy app. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.sandboxModeEnabled">sandboxModeEnabled</a></code> | <code>boolean</code> | Enabling sandbox mode will enable api key auth on all models in the transformed schema. |
Expand All @@ -1587,6 +1588,7 @@ public readonly disableResolverDeduping: boolean;
```

- *Type:* boolean
- *Default:* true

Disable resolver deduping, this can sometimes cause problems because dedupe ordering isn't stable today, which can lead to circular dependencies across stacks if models are reordered.

Expand All @@ -1599,6 +1601,7 @@ public readonly enableAutoIndexQueryNames: boolean;
```

- *Type:* boolean
- *Default:* true

Automate generation of query names, and as a result attaching all indexes as queries to the generated API.

Expand All @@ -1613,6 +1616,7 @@ public readonly enableSearchNodeToNodeEncryption: boolean;
```

- *Type:* boolean
- *Default:* false

If enabled, set nodeToNodeEncryption on the searchable domain (if one exists).

Expand All @@ -1623,13 +1627,27 @@ to use `Object.values(resources.additionalResources['AWS::Elasticsearch::Domain'

---

##### `enableTransformerCfnOutputs`<sup>Optional</sup> <a name="enableTransformerCfnOutputs" id="@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.enableTransformerCfnOutputs"></a>

```typescript
public readonly enableTransformerCfnOutputs: boolean;
```

- *Type:* boolean
- *Default:* false

When enabled, internal cfn outputs which existed in Amplify-generated apps will continue to be emitted.

---

##### `populateOwnerFieldForStaticGroupAuth`<sup>Optional</sup> <a name="populateOwnerFieldForStaticGroupAuth" id="@aws-amplify/graphql-construct-alpha.PartialSchemaTranslationBehavior.property.populateOwnerFieldForStaticGroupAuth"></a>

```typescript
public readonly populateOwnerFieldForStaticGroupAuth: boolean;
```

- *Type:* boolean
- *Default:* true

Ensure that the owner field is still populated even if a static iam or group authorization applies.

Expand All @@ -1642,6 +1660,7 @@ public readonly respectPrimaryKeyAttributesOnConnectionField: boolean;
```

- *Type:* boolean
- *Default:* true

Enable custom primary key support, there's no good reason to disable this unless trying not to update a legacy app.

Expand All @@ -1654,6 +1673,7 @@ public readonly sandboxModeEnabled: boolean;
```

- *Type:* boolean
- *Default:* false

Enabling sandbox mode will enable api key auth on all models in the transformed schema.

Expand All @@ -1666,6 +1686,7 @@ public readonly secondaryKeyAsGSI: boolean;
```

- *Type:* boolean
- *Default:* true

If disabled, generated.

Expand All @@ -1678,6 +1699,7 @@ public readonly shouldDeepMergeDirectiveConfigDefaults: boolean;
```

- *Type:* boolean
- *Default:* true

Restore parity w/ GQLv1.

Expand All @@ -1690,6 +1712,7 @@ public readonly suppressApiKeyGeneration: boolean;
```

- *Type:* boolean
- *Default:* false

If enabled, disable api key resource generation even if specified as an auth rule on the construct.

Expand All @@ -1704,6 +1727,7 @@ public readonly useSubUsernameForDefaultIdentityClaim: boolean;
```

- *Type:* boolean
- *Default:* true

Ensure that oidc and userPool auth use the `sub` field in the for the username field, which disallows new users with the same id to access data from a deleted user in the pool.

Expand Down Expand Up @@ -1820,6 +1844,7 @@ const schemaTranslationBehavior: SchemaTranslationBehavior = { ... }
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.disableResolverDeduping">disableResolverDeduping</a></code> | <code>boolean</code> | Disable resolver deduping, this can sometimes cause problems because dedupe ordering isn't stable today, which can lead to circular dependencies across stacks if models are reordered. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.enableAutoIndexQueryNames">enableAutoIndexQueryNames</a></code> | <code>boolean</code> | Automate generation of query names, and as a result attaching all indexes as queries to the generated API. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.enableSearchNodeToNodeEncryption">enableSearchNodeToNodeEncryption</a></code> | <code>boolean</code> | If enabled, set nodeToNodeEncryption on the searchable domain (if one exists). |
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.enableTransformerCfnOutputs">enableTransformerCfnOutputs</a></code> | <code>boolean</code> | When enabled, internal cfn outputs which existed in Amplify-generated apps will continue to be emitted. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.populateOwnerFieldForStaticGroupAuth">populateOwnerFieldForStaticGroupAuth</a></code> | <code>boolean</code> | Ensure that the owner field is still populated even if a static iam or group authorization applies. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.respectPrimaryKeyAttributesOnConnectionField">respectPrimaryKeyAttributesOnConnectionField</a></code> | <code>boolean</code> | Enable custom primary key support, there's no good reason to disable this unless trying not to update a legacy app. |
| <code><a href="#@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.sandboxModeEnabled">sandboxModeEnabled</a></code> | <code>boolean</code> | Enabling sandbox mode will enable api key auth on all models in the transformed schema. |
Expand All @@ -1837,6 +1862,7 @@ public readonly disableResolverDeduping: boolean;
```

- *Type:* boolean
- *Default:* true

Disable resolver deduping, this can sometimes cause problems because dedupe ordering isn't stable today, which can lead to circular dependencies across stacks if models are reordered.

Expand All @@ -1849,6 +1875,7 @@ public readonly enableAutoIndexQueryNames: boolean;
```

- *Type:* boolean
- *Default:* true

Automate generation of query names, and as a result attaching all indexes as queries to the generated API.

Expand All @@ -1863,6 +1890,7 @@ public readonly enableSearchNodeToNodeEncryption: boolean;
```

- *Type:* boolean
- *Default:* false

If enabled, set nodeToNodeEncryption on the searchable domain (if one exists).

Expand All @@ -1873,13 +1901,27 @@ to use `Object.values(resources.additionalResources['AWS::Elasticsearch::Domain'

---

##### `enableTransformerCfnOutputs`<sup>Required</sup> <a name="enableTransformerCfnOutputs" id="@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.enableTransformerCfnOutputs"></a>

```typescript
public readonly enableTransformerCfnOutputs: boolean;
```

- *Type:* boolean
- *Default:* false

When enabled, internal cfn outputs which existed in Amplify-generated apps will continue to be emitted.

---

##### `populateOwnerFieldForStaticGroupAuth`<sup>Required</sup> <a name="populateOwnerFieldForStaticGroupAuth" id="@aws-amplify/graphql-construct-alpha.SchemaTranslationBehavior.property.populateOwnerFieldForStaticGroupAuth"></a>

```typescript
public readonly populateOwnerFieldForStaticGroupAuth: boolean;
```

- *Type:* boolean
- *Default:* true

Ensure that the owner field is still populated even if a static iam or group authorization applies.

Expand All @@ -1892,6 +1934,7 @@ public readonly respectPrimaryKeyAttributesOnConnectionField: boolean;
```

- *Type:* boolean
- *Default:* true

Enable custom primary key support, there's no good reason to disable this unless trying not to update a legacy app.

Expand All @@ -1904,6 +1947,7 @@ public readonly sandboxModeEnabled: boolean;
```

- *Type:* boolean
- *Default:* false

Enabling sandbox mode will enable api key auth on all models in the transformed schema.

Expand All @@ -1916,6 +1960,7 @@ public readonly secondaryKeyAsGSI: boolean;
```

- *Type:* boolean
- *Default:* true

If disabled, generated.

Expand All @@ -1928,6 +1973,7 @@ public readonly shouldDeepMergeDirectiveConfigDefaults: boolean;
```

- *Type:* boolean
- *Default:* true

Restore parity w/ GQLv1.

Expand All @@ -1940,6 +1986,7 @@ public readonly suppressApiKeyGeneration: boolean;
```

- *Type:* boolean
- *Default:* false

If enabled, disable api key resource generation even if specified as an auth rule on the construct.

Expand All @@ -1954,6 +2001,7 @@ public readonly useSubUsernameForDefaultIdentityClaim: boolean;
```

- *Type:* boolean
- *Default:* true

Ensure that oidc and userPool auth use the `sub` field in the for the username field, which disallows new users with the same id to access data from a deleted user in the pool.

Expand Down
Loading

0 comments on commit d95a038

Please sign in to comment.