0.0.20 • Published 7 years ago

gestalt-server v0.0.20

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.2

8 years ago

0.0.3

8 years ago

0.0.1

8 years ago