@aws-amplify/graphql-transformer-interfaces
Version:
Amplify GraphQL transformer interface definitions
1,002 lines (902 loc) • 39.1 kB
Markdown
## API Report File for "@aws-amplify/graphql-transformer-interfaces"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { BackedDataSource } from 'aws-cdk-lib/aws-appsync';
import { BaseDataSource } from 'aws-cdk-lib/aws-appsync';
import { CfnDomain } from 'aws-cdk-lib/aws-elasticsearch';
import { CfnFunctionConfiguration } from 'aws-cdk-lib/aws-appsync';
import { CfnParameter } from 'aws-cdk-lib';
import { CfnResolver } from 'aws-cdk-lib/aws-appsync';
import { CfnResource } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { DirectiveDefinitionNode } from 'graphql';
import { DirectiveNode } from 'graphql';
import { DocumentNode } from 'graphql';
import { Duration } from 'aws-cdk-lib';
import { DynamoDbDataSource } from 'aws-cdk-lib/aws-appsync';
import { EnumTypeDefinitionNode } from 'graphql';
import { EnumTypeExtensionNode } from 'graphql';
import { EnumValueDefinitionNode } from 'graphql';
import { FieldDefinitionNode } from 'graphql';
import { FieldLogLevel } from 'aws-cdk-lib/aws-appsync';
import { FieldNode } from 'graphql';
import { Grant } from 'aws-cdk-lib/aws-iam';
import { GraphqlApiBase } from 'aws-cdk-lib/aws-appsync';
import { HttpDataSource } from 'aws-cdk-lib/aws-appsync';
import { HttpDataSourceOptions } from 'aws-cdk-lib/aws-appsync';
import { IamResource } from 'aws-cdk-lib/aws-appsync';
import { IAsset } from 'aws-cdk-lib';
import { IConstruct } from 'constructs';
import { IFunction } from 'aws-cdk-lib/aws-lambda';
import { IGrantable } from 'aws-cdk-lib/aws-iam';
import { ILayerVersion } from 'aws-cdk-lib/aws-lambda';
import { InputObjectTypeDefinitionNode } from 'graphql';
import { InputObjectTypeExtensionNode } from 'graphql';
import { InputValueDefinitionNode } from 'graphql';
import { InterfaceTypeDefinitionNode } from 'graphql';
import { InterfaceTypeExtensionNode } from 'graphql';
import { IRole } from 'aws-cdk-lib/aws-iam';
import { ITable } from 'aws-cdk-lib/aws-dynamodb';
import { LambdaDataSource } from 'aws-cdk-lib/aws-appsync';
import { NoneDataSource } from 'aws-cdk-lib/aws-appsync';
import { ObjectTypeDefinitionNode } from 'graphql';
import { ObjectTypeExtensionNode } from 'graphql';
import { RetentionDays } from 'aws-cdk-lib/aws-logs';
import { Runtime } from 'aws-cdk-lib/aws-lambda';
import { ScalarTypeDefinitionNode } from 'graphql';
import { SchemaDefinitionNode } from 'graphql';
import { Stack } from 'aws-cdk-lib';
import { TypeDefinitionNode } from 'graphql';
import { TypeSystemDefinitionNode } from 'graphql';
import { UnionTypeDefinitionNode } from 'graphql';
import { UnionTypeExtensionNode } from 'graphql';
// @public (undocumented)
export interface AmplifyDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
// (undocumented)
readonly dbType: 'DYNAMODB';
// (undocumented)
readonly provisionStrategy: 'AMPLIFY_TABLE';
}
// @public (undocumented)
export interface ApiKeyConfig {
// (undocumented)
apiKeyExpirationDate?: Date;
// (undocumented)
apiKeyExpirationDays: number;
// (undocumented)
description?: string;
}
// @public (undocumented)
export type AppSyncAuthConfiguration = {
defaultAuthentication: AppSyncAuthConfigurationEntry;
additionalAuthenticationProviders: Array<AppSyncAuthConfigurationEntry>;
};
// @public (undocumented)
export type AppSyncAuthConfigurationAPIKeyEntry = {
authenticationType: 'API_KEY';
apiKeyConfig?: ApiKeyConfig;
};
// Warning: (ae-forgotten-export) The symbol "AppSyncAuthConfigurationLambdaEntry" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export type AppSyncAuthConfigurationEntry = AppSyncAuthConfigurationUserPoolEntry | AppSyncAuthConfigurationAPIKeyEntry | AppSyncAuthConfigurationIAMEntry | AppSyncAuthConfigurationOIDCEntry | AppSyncAuthConfigurationLambdaEntry;
// @public (undocumented)
export type AppSyncAuthConfigurationIAMEntry = {
authenticationType: 'AWS_IAM';
};
// @public (undocumented)
export type AppSyncAuthConfigurationOIDCEntry = {
authenticationType: 'OPENID_CONNECT';
openIDConnectConfig?: OpenIDConnectConfig;
};
// @public (undocumented)
export type AppSyncAuthConfigurationUserPoolEntry = {
authenticationType: 'AMAZON_COGNITO_USER_POOLS';
userPoolConfig?: UserPoolConfig;
};
// @public (undocumented)
export type AppSyncAuthMode = 'API_KEY' | 'AMAZON_COGNITO_USER_POOLS' | 'AWS_IAM' | 'OPENID_CONNECT' | 'AWS_LAMBDA';
// @public (undocumented)
export enum AppSyncDataSourceType {
// (undocumented)
AMAZON_DYNAMODB = "AMAZON_DYNAMODB",
// (undocumented)
AMAZON_ELASTICSEARCH = "AMAZON_ELASTICSEARCH",
// (undocumented)
AWS_LAMBDA = "AWS_LAMBDA",
// (undocumented)
HTTP = "HTTP",
// (undocumented)
NONE = "NONE",
// (undocumented)
RELATIONAL_DATABASE = "RELATIONAL_DATABASE"
}
// @public (undocumented)
export interface AppSyncFunctionConfigurationProvider extends IConstruct {
// (undocumented)
readonly arn: string;
// (undocumented)
readonly functionId: string;
}
// @public (undocumented)
export type AssetProps = {
readonly fileContent: string;
readonly fileName: string;
};
// @public (undocumented)
export interface AssetProvider {
// (undocumented)
provide: (scope: Construct, name: string, props: AssetProps) => S3Asset;
}
// Warning: (ae-forgotten-export) The symbol "NoneDataSourceProvider" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export type DataSourceInstance = ITable | CfnDomain | HttpDataSource | IFunction | NoneDataSourceProvider;
// @public (undocumented)
export interface DataSourceOptions {
// (undocumented)
readonly description?: string;
// (undocumented)
readonly name?: string;
}
// @public (undocumented)
export interface DataSourceProvider extends BackedDataSource {
}
// @public (undocumented)
export interface DataSourceStrategiesProvider {
// (undocumented)
dataSourceStrategies: Record<string, ModelDataSourceStrategy>;
// (undocumented)
sqlDirectiveDataSourceStrategies?: SqlDirectiveDataSourceStrategy[];
}
// @public (undocumented)
export interface DefaultDynamoDbModelDataSourceStrategy extends ModelDataSourceStrategyBase {
// (undocumented)
readonly dbType: 'DYNAMODB';
// (undocumented)
readonly provisionStrategy: 'DEFAULT';
}
// @public (undocumented)
export interface DynamoDbDataSourceOptions extends DataSourceOptions {
// (undocumented)
readonly serviceRole: IRole;
}
// @public (undocumented)
export type FieldMapEntry = {
originalFieldName: string;
currentFieldName: string;
};
// @public (undocumented)
export type FunctionRuntimeTemplate = VTLRuntimeTemplate | JSRuntimeTemplate;
// @public (undocumented)
export interface GraphQLAPIProvider extends IConstruct {
// (undocumented)
addSchemaDependency: (construct: CfnResource) => boolean;
// (undocumented)
addToSchema: (addition: string) => void;
// (undocumented)
readonly apiId: string;
// (undocumented)
readonly assetProvider: AssetProvider;
// (undocumented)
grant: (grantee: IGrantable, resources: IamResource, ...actions: string[]) => Grant;
// (undocumented)
grantMutation: (grantee: IGrantable, ...fields: string[]) => Grant;
// (undocumented)
grantQuery: (grantee: IGrantable, ...fields: string[]) => Grant;
// (undocumented)
grantSubscription: (grantee: IGrantable, ...fields: string[]) => Grant;
// (undocumented)
readonly graphqlUrl: string;
// (undocumented)
readonly host: TransformHostProvider;
// (undocumented)
readonly name: string;
}
// @public (undocumented)
export interface ImportedAmplifyDynamoDbModelDataSourceStrategy {
// (undocumented)
readonly dbType: 'DYNAMODB';
// (undocumented)
readonly provisionStrategy: 'IMPORTED_AMPLIFY_TABLE';
// (undocumented)
readonly tableName: string;
}
// @public (undocumented)
export interface InlineMappingTemplateProvider {
// (undocumented)
bind: (scope: Construct) => string;
// (undocumented)
getTemplateHash: () => string;
// (undocumented)
type: MappingTemplateType.INLINE;
}
// @public (undocumented)
export const isSqlModelDataSourceDbConnectionConfig: (obj: any) => obj is SqlModelDataSourceDbConnectionConfig;
// @public (undocumented)
export const isSqlModelDataSourceSecretsManagerDbConnectionConfig: (obj: any) => obj is SqlModelDataSourceSecretsManagerDbConnectionConfig;
// @public (undocumented)
export const isSqlModelDataSourceSsmDbConnectionConfig: (obj: any) => obj is SqlModelDataSourceSsmDbConnectionConfig;
// @public (undocumented)
export const isSqlModelDataSourceSsmDbConnectionStringConfig: (obj: any) => obj is SqlModelDataSourceSsmDbConnectionStringConfig;
// @public (undocumented)
export const isSslCertSsmPathConfig: (obj: any) => obj is SslCertSsmPathConfig;
// @public (undocumented)
export type JSRuntimeTemplate = {
codeMappingTemplate: MappingTemplateProvider;
};
// @public (undocumented)
export interface LogConfig {
// (undocumented)
excludeVerboseContent?: boolean;
// (undocumented)
fieldLogLevel?: FieldLogLevel;
// (undocumented)
retention?: RetentionDays;
}
// @public (undocumented)
export type MappingTemplateProvider = InlineMappingTemplateProvider | S3MappingTemplateProvider;
// @public (undocumented)
export enum MappingTemplateType {
// (undocumented)
INLINE = "INLINE",
// (undocumented)
S3_LOCATION = "S3_LOCATION"
}
// @public (undocumented)
export type ModelDataSourceStrategy = DefaultDynamoDbModelDataSourceStrategy | AmplifyDynamoDbModelDataSourceStrategy | ImportedAmplifyDynamoDbModelDataSourceStrategy | SQLLambdaModelDataSourceStrategy;
// @public (undocumented)
export interface ModelDataSourceStrategyBase {
// (undocumented)
dbType: ModelDataSourceStrategyDbType;
}
// @public (undocumented)
export type ModelDataSourceStrategyDbType = 'DYNAMODB' | ModelDataSourceStrategySqlDbType;
// @public (undocumented)
export type ModelDataSourceStrategySqlDbType = 'MYSQL' | 'POSTGRES';
// @public (undocumented)
export type ModelFieldMap = {
addMappedField: (entry: FieldMapEntry) => ModelFieldMap;
addResolverReference: (entry: ResolverReferenceEntry) => ModelFieldMap;
getMappedFields: () => ReadonlyArray_2<FieldMapEntry>;
getResolverReferences: () => ReadonlyArray_2<ResolverReferenceEntry>;
};
// @public (undocumented)
export enum MutationFieldType {
// (undocumented)
CREATE = "CREATE",
// (undocumented)
DELETE = "DELETE",
// (undocumented)
UPDATE = "UPDATE"
}
// @public (undocumented)
export type NestedStackProvider = {
provide: (scope: Construct, name: string) => Stack;
};
// @public (undocumented)
export interface ProvisionedConcurrencyConfig {
// (undocumented)
readonly provisionedConcurrentExecutions: number;
}
// @public (undocumented)
export enum QueryFieldType {
// (undocumented)
GET = "GET",
// (undocumented)
LIST = "LIST",
// (undocumented)
SYNC = "SYNC"
}
// @public (undocumented)
export interface RDSLayerMapping {
// (undocumented)
readonly [key: string]: {
layerRegion: string;
};
}
// @public (undocumented)
export interface RDSLayerMappingProvider {
// (undocumented)
rdsLayerMapping?: RDSLayerMapping;
}
// @public (undocumented)
export interface RDSSNSTopicMapping {
// (undocumented)
readonly [key: string]: {
topicArn: string;
};
}
// @public (undocumented)
export interface RDSSNSTopicMappingProvider {
// (undocumented)
rdsSnsTopicMapping?: RDSSNSTopicMapping;
}
// @public (undocumented)
type ReadonlyArray_2<T> = Readonly<Array<Readonly<T>>>;
export { ReadonlyArray_2 as ReadonlyArray }
// @public (undocumented)
export type ResolverReferenceEntry = {
typeName: string;
fieldName: string;
isList: boolean;
};
// @public (undocumented)
export type S3Asset = {
assetHash: string;
httpUrl: string;
s3BucketName: string;
s3ObjectKey: string;
s3ObjectUrl: string;
};
// @public (undocumented)
export interface S3MappingFunctionCodeProvider {
// (undocumented)
bind: (scope: Construct, assetProvider: AssetProvider) => IAsset;
// (undocumented)
type: MappingTemplateType.S3_LOCATION;
}
// @public (undocumented)
export interface S3MappingTemplateProvider {
// (undocumented)
bind: (scope: Construct, assetProvider: AssetProvider) => string;
// (undocumented)
getTemplateHash: () => string;
// (undocumented)
type: MappingTemplateType.S3_LOCATION;
}
// @public (undocumented)
export interface SearchableDataSourceOptions extends DataSourceOptions {
// (undocumented)
readonly serviceRole: IRole;
}
// @public (undocumented)
export interface SqlDirectiveDataSourceStrategy {
// (undocumented)
readonly customSqlStatements?: Record<string, string>;
// (undocumented)
readonly fieldName: string;
// (undocumented)
readonly strategy: SQLLambdaModelDataSourceStrategy;
// (undocumented)
readonly typeName: 'Query' | 'Mutation';
}
// @public (undocumented)
export interface SQLLambdaModelDataSourceStrategy extends ModelDataSourceStrategyBase {
// (undocumented)
readonly dbConnectionConfig: SqlModelDataSourceDbConnectionConfig;
// (undocumented)
readonly dbType: ModelDataSourceStrategySqlDbType;
// (undocumented)
readonly minimizeRdsVpcEndpoints?: boolean;
// (undocumented)
readonly name: string;
// (undocumented)
readonly sqlLambdaProvisionedConcurrencyConfig?: ProvisionedConcurrencyConfig;
// (undocumented)
readonly vpcConfiguration?: VpcConfig;
}
// @public (undocumented)
export type SqlModelDataSourceDbConnectionConfig = SqlModelDataSourceSecretsManagerDbConnectionConfig | SqlModelDataSourceSsmDbConnectionConfig | SqlModelDataSourceSsmDbConnectionStringConfig;
// @public (undocumented)
export interface SqlModelDataSourceSecretsManagerDbConnectionConfig {
// (undocumented)
readonly databaseName: string;
// (undocumented)
readonly hostname: string;
// (undocumented)
readonly keyArn?: string;
// (undocumented)
readonly port: number;
// (undocumented)
readonly secretArn: string;
// (undocumented)
readonly sslCertConfig?: SslCertConfig;
}
// @public (undocumented)
export interface SqlModelDataSourceSsmDbConnectionConfig {
// (undocumented)
readonly databaseNameSsmPath: string;
// (undocumented)
readonly hostnameSsmPath: string;
// (undocumented)
readonly passwordSsmPath: string;
// (undocumented)
readonly portSsmPath: string;
// (undocumented)
readonly sslCertConfig?: SslCertConfig;
// (undocumented)
readonly usernameSsmPath: string;
}
// @public (undocumented)
export interface SqlModelDataSourceSsmDbConnectionStringConfig {
// (undocumented)
readonly connectionUriSsmPath: string | string[];
// (undocumented)
readonly sslCertConfig?: SslCertConfig;
}
// @public (undocumented)
export interface SslCertConfig {
}
// @public (undocumented)
export interface SslCertSsmPathConfig extends SslCertConfig {
// (undocumented)
readonly ssmPath: string | string[];
}
// @public (undocumented)
export interface StackManagerProvider {
// (undocumented)
createStack: (stackName: string) => Stack;
// (undocumented)
getParameter: (name: string) => CfnParameter | void;
// (undocumented)
getScopeFor: (resourceId: string, defaultStackName?: string) => Construct;
// (undocumented)
getStack: (stackName: string) => Stack;
// (undocumented)
getStackFor: (resourceId: string, defaultStackName?: string) => Construct;
// (undocumented)
hasStack: (stackName: string) => boolean;
// (undocumented)
readonly scope: Construct;
}
// @public (undocumented)
export interface SubnetAvailabilityZone {
// (undocumented)
readonly availabilityZone: string;
// (undocumented)
readonly subnetId: string;
}
// @public (undocumented)
export enum SubscriptionFieldType {
// (undocumented)
ON_CREATE = "ON_CREATE",
// (undocumented)
ON_DELETE = "ON_DELETE",
// (undocumented)
ON_UPDATE = "ON_UPDATE"
}
// @public (undocumented)
export type SynthParameters = {
amplifyEnvironmentName: string;
apiName: string;
authenticatedUserRoleName?: string;
unauthenticatedUserRoleName?: string;
userPoolId?: string;
identityPoolId?: string;
adminRoles?: string[];
enableIamAccess?: boolean;
provisionHotswapFriendlyResources?: boolean;
};
// @public (undocumented)
export type TransformerAuthProvider = TransformerPluginProvider;
// @public (undocumented)
export type TransformerBeforeStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'dataSourceStrategies' | 'sqlDirectiveDataSourceStrategies' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'authConfig' | 'stackManager' | 'synthParameters'>;
// @public (undocumented)
export interface TransformerContextMetadataProvider {
// (undocumented)
get: <T>(key: string) => T | undefined;
// (undocumented)
has: (key: string) => boolean;
// (undocumented)
set: <T>(key: string, value: T) => void;
}
// @public (undocumented)
export interface TransformerContextOutputProvider {
// (undocumented)
addEnum(en: EnumTypeDefinitionNode): void;
// (undocumented)
addEnumExtension(obj: EnumTypeExtensionNode): void;
// (undocumented)
addInput(inp: InputObjectTypeDefinitionNode): void;
// (undocumented)
addInputExtension(obj: InputObjectTypeExtensionNode): void;
// (undocumented)
addInterfaceExtension(obj: InterfaceTypeExtensionNode): void;
// (undocumented)
addMutationFields(fields: FieldDefinitionNode[]): void;
// (undocumented)
addObject(obj: ObjectTypeDefinitionNode): void;
// (undocumented)
addObjectExtension(obj: ObjectTypeExtensionNode): void;
// (undocumented)
addQueryFields(fields: FieldDefinitionNode[]): void;
// (undocumented)
addSubscriptionFields(fields: FieldDefinitionNode[]): void;
// (undocumented)
addType(obj: TypeDefinitionNode): void;
// (undocumented)
addUnion(obj: UnionTypeDefinitionNode): void;
// (undocumented)
addUnionExtension(obj: UnionTypeExtensionNode): void;
// (undocumented)
getInput(name: string): InputObjectTypeDefinitionNode | undefined;
// (undocumented)
getMutation(): ObjectTypeDefinitionNode | undefined;
// (undocumented)
getMutationTypeName(): string | undefined;
// (undocumented)
getObject(name: string): ObjectTypeDefinitionNode | undefined;
// (undocumented)
getQuery(): ObjectTypeDefinitionNode | undefined;
// (undocumented)
getQueryTypeName: () => string | undefined;
// (undocumented)
getSchema: () => SchemaDefinitionNode;
// (undocumented)
getSubscription(): ObjectTypeDefinitionNode | undefined;
// (undocumented)
getSubscriptionTypeName(): string | undefined;
// (undocumented)
getType(name: string): TypeSystemDefinitionNode | undefined;
// (undocumented)
getTypeDefinitionsOfKind: (kind: string) => TypeDefinitionNode[];
// (undocumented)
hasType(name: string): boolean;
// (undocumented)
putSchema: (obj: SchemaDefinitionNode) => void;
// (undocumented)
putType(obj: TypeDefinitionNode): void;
// (undocumented)
updateInput(obj: InputObjectTypeDefinitionNode): void;
// (undocumented)
updateObject(obj: ObjectTypeDefinitionNode): void;
}
// @public (undocumented)
export interface TransformerContextProvider extends DataSourceStrategiesProvider, RDSLayerMappingProvider, RDSSNSTopicMappingProvider {
// (undocumented)
api: GraphQLAPIProvider;
// (undocumented)
authConfig: AppSyncAuthConfiguration;
// (undocumented)
dataSources: TransformerDataSourceManagerProvider;
// (undocumented)
getResolverConfig: <ResolverConfig>() => ResolverConfig | undefined;
// (undocumented)
inputDocument: DocumentNode;
// (undocumented)
isProjectUsingDataStore: () => boolean;
// (undocumented)
metadata: TransformerContextMetadataProvider;
// (undocumented)
output: TransformerContextOutputProvider;
// (undocumented)
providerRegistry: TransformerProviderRegistry;
// (undocumented)
resolvers: TransformerResolversManagerProvider;
// (undocumented)
resourceHelper: TransformerResourceHelperProvider;
// (undocumented)
stackManager: StackManagerProvider;
// (undocumented)
synthParameters: SynthParameters;
// (undocumented)
transformParameters: TransformParameters;
}
// @public (undocumented)
export interface TransformerDataSourceManagerProvider {
// (undocumented)
add: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, dataSourceInstance: DataSourceInstance) => void;
// (undocumented)
get: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => DataSourceInstance;
// (undocumented)
has: (name: string) => boolean;
}
// @public (undocumented)
export type TransformerLog = {
message: string;
level: TransformerLogLevel;
};
// @public (undocumented)
export enum TransformerLogLevel {
// (undocumented)
DEBUG = "DEBUG",
// (undocumented)
ERROR = "ERROR",
// (undocumented)
INFO = "INFO",
// (undocumented)
WARN = "WARN"
}
// @public (undocumented)
export type TransformerModelEnhancementProvider = Partial<TransformerModelProvider>;
// @public (undocumented)
export interface TransformerModelProvider extends TransformerPluginProvider {
// (undocumented)
generateCreateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateDeleteResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateGetResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateListResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateOnCreateResolver?: (ctx: TransformerContextProvider, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateOnDeleteResolver?: (ctx: TransformerContextProvider, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateOnUpdateResolver?: (ctx: TransformerContextProvider, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateSyncResolver?: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
generateUpdateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string, directive?: DirectiveDefinitionNode) => TransformerResolverProvider;
// (undocumented)
getDataSourceResource: (type: ObjectTypeDefinitionNode) => DataSourceInstance;
// (undocumented)
getDataSourceType: () => AppSyncDataSourceType;
// (undocumented)
getInputs: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, operation: {
fieldName: string;
typeName: string;
type: QueryFieldType | MutationFieldType | SubscriptionFieldType;
}) => InputValueDefinitionNode[];
// (undocumented)
getMutationFieldNames: (type: ObjectTypeDefinitionNode, directive?: DirectiveDefinitionNode) => Set<{
fieldName: string;
typeName: string;
type: MutationFieldType;
}>;
// (undocumented)
getOutputType: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, operation: {
fieldName: string;
typeName: string;
type: QueryFieldType | MutationFieldType | SubscriptionFieldType;
}) => ObjectTypeDefinitionNode;
// (undocumented)
getQueryFieldNames: (type: ObjectTypeDefinitionNode, directive?: DirectiveDefinitionNode) => Set<{
fieldName: string;
typeName: string;
type: QueryFieldType;
}>;
// (undocumented)
getSubscriptionFieldNames: (type: ObjectTypeDefinitionNode, directive?: DirectiveDefinitionNode) => Set<{
fieldName: string;
typeName: string;
type: SubscriptionFieldType;
}>;
}
// @public (undocumented)
export interface TransformerPluginProvider {
// (undocumented)
after?: (context: TransformerContextProvider) => void;
// (undocumented)
argument?: (definition: InputValueDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
before?: (context: TransformerBeforeStepContextProvider) => void;
// (undocumented)
readonly directive: DirectiveDefinitionNode;
// (undocumented)
enum?: (definition: EnumTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
enumValue?: (definition: EnumValueDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
field?: (parent: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, definition: FieldDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
fieldOfExtendedType?: (parent: ObjectTypeExtensionNode, definition: FieldDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
generateResolvers?: (context: TransformerContextProvider) => void;
// (undocumented)
getLogs?: () => TransformerLog[];
// (undocumented)
input?: (definition: InputObjectTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
inputValue?: (definition: InputValueDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
interface?: (definition: InterfaceTypeDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
mutateSchema?: (context: TransformerPreProcessContextProvider) => DocumentNode;
// (undocumented)
name: string;
// (undocumented)
object?: (definition: ObjectTypeDefinitionNode, directive: DirectiveNode, acc: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
pluginType: TransformerPluginType;
// (undocumented)
preMutateSchema?: (context: TransformerPreProcessContextProvider) => void;
// (undocumented)
prepare?: (context: TransformerPrepareStepContextProvider) => void;
// (undocumented)
scalar?: (definition: ScalarTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
transformSchema?: (context: TransformerTransformSchemaStepContextProvider) => void;
// (undocumented)
typeDefinitions: TypeDefinitionNode[];
// (undocumented)
union?: (definition: UnionTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
// (undocumented)
validate?: (context: TransformerValidationStepContextProvider) => void;
}
// @public (undocumented)
export enum TransformerPluginType {
// (undocumented)
AUTH = "AUTH",
// (undocumented)
DATA_SOURCE_ENHANCER = "DATA_SOURCE_ENHANCER",
// (undocumented)
DATA_SOURCE_PROVIDER = "DATA_SOURCE_PROVIDER",
// (undocumented)
GENERIC = "GENERIC"
}
// @public (undocumented)
export type TransformerPrepareStepContextProvider = TransformerValidationStepContextProvider;
// @public (undocumented)
export interface TransformerPreProcessContextProvider {
// (undocumented)
inputDocument: DocumentNode;
// (undocumented)
schemaHelper: TransformerSchemaHelperProvider;
// (undocumented)
transformParameters: TransformParameters;
}
// @public (undocumented)
export interface TransformerProviderRegistry {
// (undocumented)
addDataSourceEnhancer: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, provider: TransformerModelEnhancementProvider) => void;
// (undocumented)
getDataSourceEnhancers: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode) => TransformerModelEnhancementProvider[];
// (undocumented)
getDataSourceProvider(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): TransformerModelProvider;
// (undocumented)
hasDataSourceProvider(type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode): boolean;
// (undocumented)
registerDataSourceProvider: (type: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, provider: TransformerModelProvider) => void;
}
// @public (undocumented)
export interface TransformerResolverProvider {
// (undocumented)
addJsFunctionToSlot: (slotName: string, codeMappingTemplate: MappingTemplateProvider, dataSource?: DataSourceProvider) => void;
// (undocumented)
addVtlFunctionToSlot: (slotName: string, requestMappingTemplate?: MappingTemplateProvider, responseMappingTemplate?: MappingTemplateProvider, dataSource?: DataSourceProvider) => void;
// (undocumented)
mapToStack: (stack: Stack) => void;
// (undocumented)
setScope: (scope: Construct) => void;
// (undocumented)
synthesize: (context: TransformerContextProvider, api: GraphQLAPIProvider) => void;
}
// @public (undocumented)
export interface TransformerResolversManagerProvider {
// (undocumented)
addResolver: (typeName: string, fieldName: string, resolver: TransformerResolverProvider) => TransformerResolverProvider;
// (undocumented)
collectResolvers: () => Map<string, TransformerResolverProvider>;
// (undocumented)
generateMutationResolver: (typeName: string, fieldName: string, resolverLogicalId: string, dataSource: DataSourceProvider, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider) => TransformerResolverProvider;
// (undocumented)
generateQueryResolver: (typeName: string, fieldName: string, resolverLogicalId: string, dataSource: DataSourceProvider, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider) => TransformerResolverProvider;
// (undocumented)
generateSubscriptionResolver: (typeName: string, fieldName: string, resolverLogicalId: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider) => TransformerResolverProvider;
// (undocumented)
getResolver: (typeName: string, fieldName: string) => TransformerResolverProvider | void;
// (undocumented)
hasResolver: (typeName: string, fieldName: string) => boolean;
// (undocumented)
removeResolver: (typeName: string, fieldName: string) => TransformerResolverProvider;
}
// @public (undocumented)
export interface TransformerResourceHelperProvider {
// (undocumented)
addDirectiveConfigExclusion(object: ObjectTypeDefinitionNode | ObjectTypeExtensionNode, field: FieldNode, directive: DirectiveNode): void;
// (undocumented)
generateIAMRoleName(name: string): string;
// (undocumented)
generateTableName(modelName: string): string;
// (undocumented)
getFieldNameMapping(modelName: string, fieldName: string): string;
// (undocumented)
getModelFieldMap(modelName: string): ModelFieldMap;
// (undocumented)
getModelFieldMapKeys(): string[];
// (undocumented)
getModelNameMapping(modelName: string): string;
// (undocumented)
isDirectiveConfigExcluded(object: ObjectTypeExtensionNode | ObjectTypeExtensionNode, field: FieldNode, directive: DirectiveNode): boolean;
// (undocumented)
isModelRenamed(modelName: string): boolean;
// (undocumented)
setModelNameMapping(modelName: string, mappedName: string): void;
}
// @public (undocumented)
export interface TransformerSchemaHelperProvider {
// (undocumented)
getTypeMapping: (newTypeName: string) => string;
// (undocumented)
setTypeMapping: (newTypeName: string, originalTypeName: string) => void;
}
// @public (undocumented)
export type TransformerSchemaVisitStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'dataSourceStrategies' | 'sqlDirectiveDataSourceStrategies' | 'output' | 'providerRegistry' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper' | 'synthParameters'>;
// @public (undocumented)
export type TransformerSecrets = {
[key: string]: any;
};
// @public (undocumented)
export type TransformerTransformSchemaStepContextProvider = TransformerValidationStepContextProvider;
// @public (undocumented)
export type TransformerValidationStepContextProvider = Pick<TransformerContextProvider, 'inputDocument' | 'dataSourceStrategies' | 'sqlDirectiveDataSourceStrategies' | 'output' | 'providerRegistry' | 'dataSources' | 'transformParameters' | 'isProjectUsingDataStore' | 'getResolverConfig' | 'metadata' | 'authConfig' | 'resourceHelper' | 'resolvers' | 'stackManager' | 'synthParameters'>;
// @public (undocumented)
export interface TransformHostProvider {
// (undocumented)
addAppSyncFunction: (name: string, mappingTemplate: FunctionRuntimeTemplate, dataSourceName: string, scope?: Construct, runtime?: CfnFunctionConfiguration.AppSyncRuntimeProperty) => AppSyncFunctionConfigurationProvider;
// (undocumented)
addAppSyncJsRuntimeFunction: (name: string, codeMappingTemplate: MappingTemplateProvider, dataSourceName: string, scope?: Construct) => AppSyncFunctionConfigurationProvider;
// (undocumented)
addAppSyncVtlRuntimeFunction: (name: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider, dataSourceName: string, scope?: Construct) => AppSyncFunctionConfigurationProvider;
// (undocumented)
addDynamoDbDataSource(name: string, table: ITable, options?: DynamoDbDataSourceOptions, scope?: Construct): DynamoDbDataSource;
// (undocumented)
addHttpDataSource(name: string, endpoint: string, options?: HttpDataSourceOptions, scope?: Construct): HttpDataSource;
// (undocumented)
addJsRuntimeResolver: (typeName: string, fieldName: string, codeMappingTemplate: MappingTemplateProvider, resolverLogicalId?: string, dataSourceName?: string, pipelineConfig?: string[], scope?: Construct) => CfnResolver;
// (undocumented)
addLambdaDataSource(name: string, lambdaFunction: IFunction, options?: DataSourceOptions, scope?: Construct): LambdaDataSource;
// (undocumented)
addLambdaFunction: (functionName: string, functionKey: string, handlerName: string, filePath: string, runtime: Runtime, layers?: ILayerVersion[], role?: IRole, environment?: {
[key: string]: string;
}, timeout?: Duration, scope?: Construct, vpc?: VpcConfig, description?: string) => IFunction;
// (undocumented)
addNoneDataSource(name: string, options?: DataSourceOptions, scope?: Construct): NoneDataSource;
// (undocumented)
addResolver: (typeName: string, fieldName: string, mappingTemplate: FunctionRuntimeTemplate, resolverLogicalId?: string, dataSourceName?: string, pipelineConfig?: string[], scope?: Construct, runtime?: CfnFunctionConfiguration.AppSyncRuntimeProperty) => CfnResolver;
// (undocumented)
addSearchableDataSource(name: string, endpoint: string, region: string, options?: SearchableDataSourceOptions, scope?: Construct): BaseDataSource;
// (undocumented)
addVtlRuntimeResolver: (typeName: string, fieldName: string, requestMappingTemplate: MappingTemplateProvider, responseMappingTemplate: MappingTemplateProvider, resolverLogicalId?: string, dataSourceName?: string, pipelineConfig?: string[], scope?: Construct) => CfnResolver;
// (undocumented)
getDataSource: (name: string) => BaseDataSource | void;
// (undocumented)
getResolver: (typeName: string, fieldName: string) => CfnResolver | void;
// (undocumented)
hasDataSource: (name: string) => boolean;
// (undocumented)
hasResolver: (typeName: string, fieldName: string) => boolean;
// (undocumented)
setAPI(api: GraphqlApiBase): void;
}
// @public (undocumented)
export interface TransformParameterProvider {
// (undocumented)
provide: (name: string) => CfnParameter | void;
}
// @public (undocumented)
export type TransformParameters = {
enableTransformerCfnOutputs: boolean;
shouldDeepMergeDirectiveConfigDefaults: boolean;
disableResolverDeduping: boolean;
sandboxModeEnabled: boolean;
allowDestructiveGraphqlSchemaUpdates: boolean;
replaceTableUponGsiUpdate: boolean;
allowGen1Patterns: boolean;
useSubUsernameForDefaultIdentityClaim: boolean;
populateOwnerFieldForStaticGroupAuth: boolean;
suppressApiKeyGeneration: boolean;
subscriptionsInheritPrimaryAuth: boolean;
secondaryKeyAsGSI: boolean;
enableAutoIndexQueryNames: boolean;
respectPrimaryKeyAttributesOnConnectionField: boolean;
enableSearchNodeToNodeEncryption: boolean;
enableSearchEncryptionAtRest: boolean;
};
// @public (undocumented)
export interface UserPoolConfig {
// (undocumented)
userPoolId: string;
}
// @public (undocumented)
export interface VpcConfig {
// (undocumented)
readonly securityGroupIds: string[];
// (undocumented)
readonly subnetAvailabilityZoneConfig: SubnetAvailabilityZone[];
// (undocumented)
readonly vpcId: string;
}
// @public (undocumented)
export type VTLRuntimeTemplate = {
requestMappingTemplate: MappingTemplateProvider;
responseMappingTemplate: MappingTemplateProvider;
};
// Warnings were encountered during analysis:
//
// src/graphql-api-provider.ts:37:3 - (ae-forgotten-export) The symbol "OpenIDConnectConfig" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
```