@apollo/cache-control-types
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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.

/@apollo/cache-control-types/

    Package Sidebar

    Install

    npm i @apollo/cache-control-types

    Weekly Downloads

    1,104,247

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    75.6 kB

    Total Files

    16

    Last publish

    Collaborators

    • dkuc
    • glasser
    • trevor.scheer
    • apollo-bot