# @apollo/cache-control-types

> TypeScript types for Apollo Server info.cacheControl

Latest version **1.0.3** (published 2023-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @apollo/cache-control-types
pnpm add @apollo/cache-control-types
yarn add @apollo/cache-control-types
bun add @apollo/cache-control-types
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-06-26 |
| First published | 2022-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 73.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13952 |
| Author | Apollo |
| Maintainers | dkuc, glasser, trevor.scheer, apollo-bot |
| Keywords | apollo, graphql, typescript, node |

## Links

- npm: https://www.npmjs.com/package/@apollo/cache-control-types
- Repository: https://github.com/apollographql/apollo-server
- Homepage: https://github.com/apollographql/apollo-server#readme
- Issues: https://github.com/apollographql/apollo-server/issues
- npm.io page: https://npm.io/package/@apollo/cache-control-types

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2023-06-26
- 1.0.2 — 2022-08-04
- 1.0.1 — 2022-08-04
- 1.0.0 — 2022-08-03

## README

# Cache Control types

This package exports various TypeScript types related to Apollo Server's cache
policy calculation.

Specifically, it gives a type-safe way to get the `info.cacheControl` field in resolvers. Either declare your resolver's `info` argument to be of type `GraphQLResolveInfoWithCacheControl` (perhaps with the graphql-code-generator typescript-resolvers customResolveInfo option), or use the `maybeCacheControlFromInfo` or `cacheControlFromInfo` functions to extract `info.cacheControl` in a type-safe way.

---
_Source: https://npm.io/package/@apollo/cache-control-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
