GraphQL Network Communication Framework (Server)
GraphQL-IO |
GraphQL-IO-Client |
GraphQL-IO-Server
GraphQL Network Communication Framework (Server)
This is a GraphQL network communication framework for
JavaScript servers, running under Node.js.
It is based on the GraphQL engine GraphQL.js,
the GraphQL schema execution library GraphQL-Tools,
the GraphQL type definition library GraphQL-Tools-Types,
the GraphQL subscription management library GraphQL-Tools-Subscribe,
the network communication framework HAPI,
the WebSocket integration plugin HAPI-Plugin-WebSocket
and the GraphiQL integration plugin HAPI-Plugin-GraphiQL.
It has be used with the corresponding GraphQL-IO-Client
network communication framework on the JavaScript client side.
$ npm install graphql-io-server
/* all-in-one */
import { Server } from "graphql-io"
/* client-side only */
import { Server } from "graphql-io-server"
See the TypeScript type definition of the GraphQL-IO-Server API for details.
/* Hello World Server */
const { Server } = require("graphql-io-server")
const server = new Server({ url: "http://127.0.0.1:12345/api" })
server.at("graphql-resolver", () => ({
Root: { hello: [ "hello: String", () => "world" ] }
}))
await server.start()
For more elaborate samples, check out the Samples folder.
Copyright (c) 2016-2019 Dr. Ralf S. Engelschall (http://engelschall.com/)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.