1.4.3 • Published 3 years ago

apollo-type-guards v1.4.3

Weekly downloads
16
License
MIT
Repository
github
Last release
3 years ago

Apollo Type Guards

This binary lets you enhance types generated by Apollo CLI by creating type guards associated with it.

Install

With npm:

npm install --save-dev apollo-type-guards

With yarn:

yarn add --dev apollo-type-guards

Usage

  • Run apollo client:codegen CLI to generate types files from your schema
  • Run
    apollo-type-guards --globDir="glob/to/generated/folders"
  • Depending on you folder structure you should see something like this:
    Before :
    .
    └── src
        └── __generated__
            ├── QueryOne.ts
            └── QueryTwo.ts
    After:
    .
    └── src
        └── __generated__
            ├── guards
            │   ├── QueryOne.ts
            │   └── QueryTwo.ts
            ├── QueryOne.ts
            └── QueryTwo.ts
1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago