Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-ws

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-ws - npm Package Compare versions

Comparing version 4.8.0 to 4.9.0

lib/use/fastify-websocket.d.ts

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [4.9.0](https://github.com/enisdenjo/graphql-ws/compare/v4.8.0...v4.9.0) (2021-06-06)
### Features
* **server:** Use `fastify-websocket` ([#200](https://github.com/enisdenjo/graphql-ws/issues/200)) ([b62fc95](https://github.com/enisdenjo/graphql-ws/commit/b62fc958bb0b67224d3c1b684d441bd8349c4b8a))
# [4.8.0](https://github.com/enisdenjo/graphql-ws/compare/v4.7.0...v4.8.0) (2021-06-03)

@@ -2,0 +9,0 @@

8

package.json
{
"name": "graphql-ws",
"version": "4.8.0",
"version": "4.9.0",
"description": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client",

@@ -44,2 +44,6 @@ "keywords": [

},
"./lib/use/fastify-websocket": {
"require": "./lib/use/fastify-websocket.js",
"import": "./lib/use/fastify-websocket.mjs"
},
"./package.json": "./package.json"

@@ -94,2 +98,4 @@ },

"eslint-plugin-prettier": "^3.4.0",
"fastify": "^3.17.0",
"fastify-websocket": "^3.2.0",
"glob": "^7.1.7",

@@ -96,0 +102,0 @@ "graphql": "^15.5.0",

@@ -95,2 +95,30 @@ <div align="center">

##### With [fastify-websocket](https://github.com/fastify/fastify-websocket)
```ts
import Fastify from 'fastify'; // yarn add fastify
import fastifyWebsocket from 'fastify-websocket'; // yarn add fastify-websocket
import { makeHandler } from 'graphql-ws/lib/use/fastify-websocket';
const fastify = Fastify();
fastify.register(fastifyWebsocket);
fastify.get(
'/graphql',
{ websocket: true },
makeHandler(
// from the previous step
{ schema, roots },
),
);
fastify.listen(4000, (err) => {
if (err) {
fastify.log.error(err);
return process.exit(1);
}
console.log('Listening to port 4000');
});
```
#### Use the client

@@ -97,0 +125,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc