@aws-amplify/graphql-transformer-interfaces 3.3.0-rds-5.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +57 -19
- package/CHANGELOG.md +10 -1
- package/lib/graphql-api-provider.d.ts +16 -12
- package/lib/graphql-api-provider.d.ts.map +1 -1
- package/lib/graphql-api-provider.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/transformer-context/index.d.ts +1 -1
- package/lib/transformer-context/index.d.ts.map +1 -1
- package/lib/transformer-context/index.js +3 -1
- package/lib/transformer-context/index.js.map +1 -1
- package/lib/transformer-context/transform-parameters.d.ts +2 -0
- package/lib/transformer-context/transform-parameters.d.ts.map +1 -1
- package/lib/transformer-context/transformer-context-provider.d.ts +4 -3
- package/lib/transformer-context/transformer-context-provider.d.ts.map +1 -1
- package/lib/transformer-context/transformer-datasource-provider.d.ts +15 -5
- package/lib/transformer-context/transformer-datasource-provider.d.ts.map +1 -1
- package/lib/transformer-context/transformer-datasource-provider.js +10 -1
- package/lib/transformer-context/transformer-datasource-provider.js.map +1 -1
- package/package.json +2 -2
- package/src/graphql-api-provider.ts +43 -17
- package/src/index.ts +2 -0
- package/src/transformer-context/index.ts +5 -1
- package/src/transformer-context/transform-parameters.ts +2 -0
- package/src/transformer-context/transformer-context-provider.ts +10 -3
- package/src/transformer-context/transformer-datasource-provider.ts +37 -8
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -20,23 +20,52 @@ export interface NoneDataSourceProvider {
|
|
|
20
20
|
export type DataSourceInstance = ITable | CfnDomain | HttpDataSource | IFunction | NoneDataSourceProvider;
|
|
21
21
|
|
|
22
22
|
export interface TransformerDataSourceManagerProvider {
|
|
23
|
-
add(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance)
|
|
24
|
-
get(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode)
|
|
25
|
-
has(name: string)
|
|
23
|
+
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
|
|
24
|
+
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
|
|
25
|
+
has: (name: string) => boolean;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface DataSourceProvider extends BackedDataSource {}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Supported transformable database types.
|
|
31
|
+
* Supported transformable database types. TODO: Move this to amplify-graphql-api-construct
|
|
32
32
|
*/
|
|
33
|
-
export type DBType = 'DDB' |
|
|
33
|
+
export type DBType = 'DDB' | SQLDBType;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* storage or whether it already exists.
|
|
36
|
+
* Supported transformable SQL database types. TODO: Move this to amplify-graphql-api-construct
|
|
38
37
|
*/
|
|
39
|
-
export
|
|
38
|
+
export type SQLDBType = 'MySQL' | 'Postgres';
|
|
39
|
+
|
|
40
|
+
// TODO: add strategy for the RDS. TODO: Move this to amplify-graphql-api-construct
|
|
41
|
+
export type DataSourceProvisionStrategy = DynamoDBProvisionStrategy | SQLLambdaModelProvisionStrategy;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Provisioning configuration for a DynamoDB datasource. TODO: Remove this type in favor of strategy definitions in
|
|
45
|
+
* amplify-graphql-api-construct
|
|
46
|
+
*/
|
|
47
|
+
export const enum DynamoDBProvisionStrategy {
|
|
48
|
+
/**
|
|
49
|
+
* Use default CloudFormation resource of `AWS::DynamoDB::Table`
|
|
50
|
+
*/
|
|
51
|
+
DEFAULT = 'DEFAULT',
|
|
52
|
+
/**
|
|
53
|
+
* Use custom resource type `Custom::AmplifyDynamoDBTable`
|
|
54
|
+
*/
|
|
55
|
+
AMPLIFY_TABLE = 'AMPLIFY_TABLE',
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// TODO: Remove this type in favor of fully-specified SQLLambdaModelDataSourceStrategy from amplify-graphql-api-construct
|
|
59
|
+
export const enum SQLLambdaModelProvisionStrategy {
|
|
60
|
+
/**
|
|
61
|
+
* A strategy that creates a Lambda to connect to a pre-existing SQL table to resolve model data.
|
|
62
|
+
*/
|
|
63
|
+
DEFAULT = 'DEFAULT',
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// TODO: Replace usages of this type with ModelDataSourceStrategy
|
|
67
|
+
export interface DataSourceType {
|
|
40
68
|
dbType: DBType;
|
|
41
69
|
provisionDB: boolean;
|
|
70
|
+
provisionStrategy: DataSourceProvisionStrategy;
|
|
42
71
|
}
|