# caa-common

> Common dependencies

Latest version **1.0.0** (published 2019-10-10) · 0 weekly downloads

## Install

```sh
npm install caa-common
pnpm add caa-common
yarn add caa-common
bun add caa-common
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-10-10 |
| First published | 2019-10-10 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 182.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CarAndAway |
| Maintainers | erdo-car |

## Links

- npm: https://www.npmjs.com/package/caa-common
- Repository: https://github.com/carandaway/caa-common
- Homepage: https://github.com/carandaway/caa-common#readme
- Issues: https://github.com/carandaway/caa-common/issues
- npm.io page: https://npm.io/package/caa-common

## Dependencies (1)

- [merge-graphql-schemas](https://npm.io/package/merge-graphql-schemas.md) ^1.7.0

## Recent versions

- 1.0.0 (latest) — 2019-10-10

## README

[![CircleCI](https://circleci.com/gh/carandaway/caa-common.svg?style=svg)](https://circleci.com/gh/carandaway/caa-common)

# caa-common

This is the common package which can be used by backend and frontend. This package currently provides typescript tpyes that are generated from graphql schema. Both backend and frontend should be using these types in order to have type safety.

## Generating types from schema.graphql

When there is a change in `schema.graphql` `types.ts` file must me re-generated. That's how we have got typescript types from graphql types. To run the generation simply run the following command inside `caa-common` folder. 

```
npm run generate
```

## Using caa-common in backend & frontend

For the moment you can add `caa-common` as dependency by path:
(assuming `caa-common` folder is next to your actual project folder)
```
...
"dependencies": {
  ...
  "caa-common": "file:../caa-common"
  ...
}
...
```

After this you can use types from `caa-common` as usual:
```
import { Profile } from 'caa-common';
```

---
_Source: https://npm.io/package/caa-common · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
