jokio-graphql
v0.5.5
Published
graphql middleware for jokio
Downloads
151
Readme
GraphQL Server
High level package built on top of graphql-yoga, to create graphql server with websocket support easily.
Features:
- All graphql-yoga features
- Authentication support
- Apollo Engine support
- Pre-defined scalar types: Date, Time, DateTime, JSON
- Pre-defined Graph for getting server stats
- Remote Schema stitching
- Local Schema stitching
- Rest apis integration
- Dotenv support (for development environment)
- Web sockets improved support
Example:
import { run } from 'jokio'
import { graphql, LocalSchema } from 'jokio-graphql';
const schema: LocalSchema = {
typeDefs: `
extend type Query {
hello: String
}
`,
resolvers: {
Query: {
hello: () => 'world'
}
}
}
run(
graphql({ localSchemas: [schema] })
)