# graph-entity

> define a decorated class to visit graph server.

Latest version **0.1.3** (published 2017-03-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install graph-entity
pnpm add graph-entity
yarn add graph-entity
bun add graph-entity
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2017-03-10 |
| First published | 2017-03-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zxlwbi199101 |
| Maintainers | xinleizhao |
| Keywords | graphql, entity, graphentity, graph-entity |

## Links

- npm: https://www.npmjs.com/package/graph-entity
- Repository: https://github.com/zxlwbi199101/graph-entity
- Homepage: https://github.com/zxlwbi199101/graph-entity#readme
- Issues: https://github.com/zxlwbi199101/graph-entity/issues
- npm.io page: https://npm.io/package/graph-entity

## 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

- 0.1.3 (latest) — 2017-03-10
- 0.1.2 — 2017-03-10
- 0.1.1 — 2017-03-10
- 0.1.0 — 2017-03-09

## README

# graph-entity
visit graphql backend through entity object interface

define your entity like:
```js
class User {
  @field('ID')      id;
  @field('Date')    createdAt;
  @field('Date')    updatedAt;
  @field('String')  name;
  @field('String')  description;
  @field('String')  status;
  @field('Profile') profile;

  @query('userlist', { list: 'User' })
  @exclude(['list.profile'])
  static getAll() {
    return {};
  }

  @query('getUser', 'User')
  static get(id) {
    return { id };
  }
}
```

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