0.0.20 • Published 8 years ago

gestalt-server v0.0.20

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

gestalt-server

npm version

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.
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);
0.0.20

8 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.2

10 years ago

0.0.3

10 years ago

0.0.1

10 years ago