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 1.10.0 to 1.11.0

cjs/client.d.ts

22

CHANGELOG.md

@@ -0,1 +1,23 @@

# [1.11.0](https://github.com/enisdenjo/graphql-ws/compare/v1.10.0...v1.11.0) (2020-11-04)
### Bug Fixes
* Node 10 is the min supported version ([19844d7](https://github.com/enisdenjo/graphql-ws/commit/19844d72f4638f9f7126870f9d9a744cdb4814c4))
* Support more `graphql` versions ([de69b4e](https://github.com/enisdenjo/graphql-ws/commit/de69b4ea39905f9b3343711e9defe68c6746b842))
* **server:** Close socket if `onSubscribe` returns invalid array ([#53](https://github.com/enisdenjo/graphql-ws/issues/53)) ([0464a54](https://github.com/enisdenjo/graphql-ws/commit/0464a54eee09dfdf66d65bf539a4d8f596be2697))
* **server:** Consistently set `rootValue` and `contextValue`, if not overridden ([#49](https://github.com/enisdenjo/graphql-ws/issues/49)) ([7aa3bcd](https://github.com/enisdenjo/graphql-ws/commit/7aa3bcdd38d40e83306f867a5b6b1bd612ec5fe3))
* **server:** Distribute server error to all clients even if one error listener throws ([#56](https://github.com/enisdenjo/graphql-ws/issues/56)) ([b96dbb9](https://github.com/enisdenjo/graphql-ws/commit/b96dbb98bb6f71956321ce1202af0af50df4e40e))
* **server:** Don't surface bad request error details in production ([#55](https://github.com/enisdenjo/graphql-ws/issues/55)) ([70317b2](https://github.com/enisdenjo/graphql-ws/commit/70317b2619b7729e5d5556b4e5388f142414b082))
### Features
* `cjs`, `esm` and `umd` builds with minification and compression for the browser ([#58](https://github.com/enisdenjo/graphql-ws/issues/58)) ([ebb8dfe](https://github.com/enisdenjo/graphql-ws/commit/ebb8dfe8a1e50507bcc2b0929600d755ddd98b1d))
### Performance Improvements
* Reduce runtime prototype traversal for hasOwnProperty ([#52](https://github.com/enisdenjo/graphql-ws/issues/52)) ([1bb9218](https://github.com/enisdenjo/graphql-ws/commit/1bb9218ad3ee9442442122c1d10910d51951b763))
# [1.10.0](https://github.com/enisdenjo/graphql-ws/compare/v1.9.3...v1.10.0) (2020-11-03)

@@ -2,0 +24,0 @@

25

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

@@ -24,7 +24,13 @@ "keywords": [

},
"main": "lib/index.js",
"browser": "lib/client.js",
"types": "lib/index.d.ts",
"engines": {
"node": ">=10"
},
"main": "cjs/index.js",
"module": "esm/index.js",
"browser": "umd/graphql-ws.js",
"types": "esm/index.d.ts",
"files": [
"lib",
"cjs",
"esm",
"umd",
"README.md",

@@ -42,7 +48,10 @@ "LICENSE.md",

"test": "jest",
"build": "tsc -b tsconfig.build.json",
"build:cjs": "tsc -b tsconfig.cjs.json",
"build:esm": "tsc -b tsconfig.esm.json",
"build:umd": "rollup -c && gzip umd/graphql-ws.min.js -c > umd/graphql-ws.min.js.gz",
"build": "yarn build:cjs && yarn build:esm && yarn build:umd",
"release": "semantic-release"
},
"peerDependencies": {
"graphql": "^15.0.0"
"graphql": ">=0.11 <=15"
},

@@ -73,2 +82,4 @@ "dependencies": {

"prettier": "^2.1.2",
"rollup": "^2.33.1",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^17.2.2",

@@ -75,0 +86,0 @@ "typedoc": "^0.19.2",

@@ -276,3 +276,3 @@ <div align="center">

import { print } from 'graphql';
import { createClient, Config, Client } from 'graphql-ws';
import { createClient, ClientOptions, Client } from 'graphql-ws';

@@ -282,5 +282,5 @@ class WebSocketLink extends ApolloLink {

constructor(config: Config) {
constructor(options: ClientOptions) {
super();
this.client = createClient(config);
this.client = createClient(options);
}

@@ -293,3 +293,4 @@

{
...sink,
next: sink.next,
complete: sink.complete,
error: (err) => {

@@ -336,2 +337,32 @@ if (err instanceof Error) {

<details>
<summary>Client usage in browser</summary>
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>GraphQL over WebSocket</title>
<script
type="text/javascript"
src="https://unpkg.com/graphql-ws/umd/graphql-ws.min.js"
></script>
</head>
<body>
<script type="text/javascript">
(function () {
const client = graphqlWs.createClient({
url: 'wss://umdfor.the/win/graphql',
});
// consider other recipes for usage inspiration
})();
</script>
</body>
</html>
```
</details>
<details>
<summary>Client usage in Node</summary>

@@ -338,0 +369,0 @@

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