diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-cache.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-cache.ts new file mode 100644 index 0000000000000..795b585f08e01 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.appsync-cache.ts @@ -0,0 +1,25 @@ +import * as path from 'path'; +import * as cdk from 'aws-cdk-lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as appsync from 'aws-cdk-lib/aws-appsync'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'stack'); + +const api = new appsync.GraphqlApi(stack, 'baseAPI', { + name: 'baseAPI', + schema: appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql')), +}); + +new appsync.ApiCache(stack, 'apiCache', { + apiId: api.apiId, + apiCachingBehavior: appsync.CacheBehavior.FULL_REQUEST_CACHING, + type: appsync.CacheType.LARGE, + ttl: 60, +}); + +new IntegTest(app, 'api', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-appsync/lib/api-cache.ts b/packages/aws-cdk-lib/aws-appsync/lib/api-cache.ts index f652badada25b..2e08d796d9147 100644 --- a/packages/aws-cdk-lib/aws-appsync/lib/api-cache.ts +++ b/packages/aws-cdk-lib/aws-appsync/lib/api-cache.ts @@ -5,7 +5,7 @@ import { CfnApiCache } from './appsync.generated'; * enum with all Api Caching Behavior values */ export enum CacheBehavior { - /* + /** * FULL_REQUEST_CACHING: All requests are fully cached. */ FULL_REQUEST_CACHING = 'FULL_REQUEST_CACHING',