0.1.15 • Published 8 years ago

apollo-socket-network-interface-server v0.1.15

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
8 years ago

Apollo Socket Network Interface (Server)

Apollo-GraphQL network interface for sockets.

Enables high-performance communication without the overhead of HTTP.

Example

import createServer from 'apollo-socket-network-interface-server';
import { makeExecutableSchema } from 'graphql-tools';
import typeDefs from './typeDefs';
import resolvers from './resolvers';

// http://dev.apollodata.com/tools/graphql-tools/generate-schema.html#makeExecutableSchema
let schema = makeExecutableSchema({
    typeDefs: typeDefs,
    resolvers: resolvers,
});

let sockServer = createServer({
    path: '/tmp/redspider-graphql.sock',
    schema: schema,
});

['SIGTERM','SIGINT'].forEach(signal => process.on(signal, () => {
    // shut the server down cleanly
    sockServer.close();
    process.exit();
}));

License

MIT.

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago