# gestalt-server

> schema defined graphql server

Latest version **0.0.20** (published 2017-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install gestalt-server
pnpm add gestalt-server
yarn add gestalt-server
bun add gestalt-server
```

## 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.0.20 |
| Published | 2017-08-27 |
| First published | 2016-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 204 |
| Author | Charlie Schwabacher |
| Maintainers | charlieschwabacher |

## Links

- npm: https://www.npmjs.com/package/gestalt-server
- Repository: https://github.com/charlieschwabacher/gestalt
- Homepage: https://github.com/charlieschwabacher/gestalt#readme
- Issues: https://github.com/charlieschwabacher/gestalt/issues
- npm.io page: https://npm.io/package/gestalt-server

## Dependencies (4)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [cookie-session](https://npm.io/package/cookie-session.md) ^1.3.0
- [express-graphql](https://npm.io/package/express-graphql.md) ^0.5.4
- [gestalt-graphql](https://npm.io/package/gestalt-graphql.md) ^0.0.20

## Recent versions

- 0.0.20 (latest) — 2017-08-27
- 0.0.19 — 2017-06-03
- 0.0.18 — 2017-06-03
- 0.0.17 — 2016-07-06
- 0.0.16 — 2016-07-03
- 0.0.15 — 2016-07-02
- 0.0.14 — 2016-07-01
- 0.0.13 — 2016-06-27
- 0.0.12 — 2016-06-25
- 0.0.11 — 2016-06-23
- 0.0.10 — 2016-06-23
- 0.0.9 — 2016-06-23
- 0.0.8 — 2016-06-23
- 0.0.7 — 2016-06-23
- 0.0.6 — 2016-06-20
- … 3 more at https://npm.io/package/gestalt-server/versions

## README

gestalt-server
--------------

[![npm version](https://badge.fury.io/js/gestalt-server.svg)](https://badge.fury.io/js/gestalt-server)

Connect middleware based on `express-graphql` to create a GraphQL API server
using the Gestalt framework.  Accepts the following options:

- `schemaPath` - the path to your schema definition in GraphQL
- `database` - a database adapter
- `objects` - an array of object definitions
- `mutations` - an array of mutation definition functions
- `secret` - used to sign the session cookie
- `development` - a boolean, if true gestalt will log queries and serve the
  GraphiQL IDE.


```javascript
import gestaltServer from 'gestalt-server';
import gestaltPostgres from 'gestalt-postgres';
import importAll from 'import-all';

const app = express();

app.use('/graphql', gestaltServer({
  schemaPath: `${__dirname}/schema.graphql`,
  database: gestaltPostgres({
    databaseURL: 'postgres://localhost'
  }),
  objects: importAll(`${__dirname}/objects`),
  mutations: importAll(`${__dirname}/mutations`),
  secret: '༼ つ ◕_◕ ༽つ',
}));

app.listen(3000);
```

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