Registry / devops / graphql-io-server

graphql-io-server

JSON →
library1.9.3jsnpmunverified

GraphQL-IO-Server is a server-side network communication framework for GraphQL, built on Node.js. It integrates GraphQL.js for schema execution, GraphQL-Tools for schema stitching, GraphQL-Tools-Types for custom scalars, and GraphQL-Tools-Subscribe for subscription management. The server runs on HAPI.js with WebSocket support via HAPI-Plugin-WebSocket, enabling real-time subscription delivery. It includes built-in GraphiQL integration for interactive querying. Version 1.9.3 is the latest stable release, with no updates since 2019. It is designed for use with GraphQL-IO-Client on the client side. The package provides a complete solution for GraphQL server communication, distinguishing itself by its reliance on HAPI and WebSocket-based subscriptions rather than Express or Apollo Server.

npm install graphql-io-server
INSTALL
IMPORT
SIG · GRAPHQL-IO-SERVER
G
graphql-io-server
devopsjavascriptv1.9.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
import { Server } from 'graphql-io-server'
import Server from 'graphql-io-server'
Named export, not default. Also available as 'graphql-io' re-export.
Server
const { Server } = require('graphql-io-server')
const Server = require('graphql-io-server')
CommonJS destructured require is required.
Other Symbols
import { Server } from 'graphql-io'
import { Client } from 'graphql-io'
Only Server is exported from this package; Client is in graphql-io-client.

Initialize a GraphQL-IO-Server with a simple hello world resolver and start it.

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" ] } })); server.start().then(() => console.log('Server running'));
Debug
Known issues
deprecatedHAPI v17+ API changes: graphql-io-server may not be compatible with newer HAPI versions.
fix
Pin @hapi/hapi to version 18.x or use older HAPI v16 with legacy hapi packages.
affects: >=1.9
breakingESM import from 'graphql-io' may break if package is not configured for ESM.
fix
Use CommonJS require or ensure Node.js version supports ESM and package.json has 'type': 'module'.
affects: >=1.0
gotchaThe Server constructor's 'url' option must include the base path; it is not just a host:port.
fix
Provide full URL like 'http://host:port/api'.
affects: >=1.0
Errors
Common errors & fixes
Cannot find module 'graphql-tools-types'
Missing dependency graphql-tools-types or not installed.
fix
Run 'npm install graphql-tools-types' or check that it is listed in package.json.
TypeError: server.at is not a function
Server instance not properly created or outdated version.
fix
Ensure you use `new Server({...})` with valid options and the correct import.
Error: listen EADDRINUSE :::12345
Port already in use by another process.
fix
Use a different port or kill the conflicting process.
Upgrade
Version history
1.9.3latest on npm
Audit
Dependencies
graphqlrequiredCore dependency for GraphQL execution
graphql-toolsrequiredProvides schema stitching and type definitions
graphql-tools-typesrequiredCustom GraphQL scalar types
graphql-tools-subscriberequiredSubscription management library
@hapi/hapirequiredHTTP server framework
hapi-plugin-websocketrequiredWebSocket integration for HAPI
hapi-plugin-graphiqlrequiredGraphiQL IDE integration
Agent activity
8 hits · last 30 days
node
8
Resources
graphql-io-server — npm install graphql-io-server · libregistry