apollo-socket-network-interface-server

0.1.15 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.150latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.150
0.1.140
0.1.130
0.1.120
0.1.110
0.1.100
0.1.90
0.1.80
0.1.40
0.1.30
0.1.20

Package Sidebar

Install

npm i apollo-socket-network-interface-server

Weekly Downloads

0

Version

0.1.15

License

MIT

Last publish

Collaborators

  • mglamuzina
  • cbucholz
  • ejackisch
  • mnpenner
  • sramage