Skip to content

FlushApiCache

Source: src/AWS/AppSync/FlushApiCache.ts

Runtime binding for appsync:FlushApiCache — flush a GraphqlApi’s server-side cache from a Lambda (or other AWS runtime), e.g. after writing to the underlying data store out of band.

Fails with the typed NotFoundException when the API has no cache provisioned. Provide AppSync.FlushApiCacheHttp on the hosting function’s Effect to implement the binding.

const flushCache = yield* AppSync.FlushApiCache(api);
yield* flushCache().pipe(
// no cache provisioned — nothing to flush
Effect.catchTag("NotFoundException", () => Effect.void),
);