Skip to content

Commit

Permalink
feat(server): websockets support (#986)
Browse files Browse the repository at this point in the history
* Websocket subscriptions support

* GraphiQL subscriptions support

* 4.3.3-0

* Fix reference

* Fix websocket URL when relative

* 4.3.3-1

* Add @types/ws

* Connection indication, subscription indication, error tracking

* Work around GraphiQL error display issue

* Coloured circle instead of emojis 馃槥

* Only allow subscriptions over websocket transport

* Enable hooking ws onOperation

* Minimize diff

* Prettier for postgraphiql

* Log error

* Fix headers

* Rename variables, add comments, fix things

* Lint

* Tweak connection indicator icons
  • Loading branch information
benjie committed Feb 7, 2019
1 parent 8fe7c7c commit ede614c
Show file tree
Hide file tree
Showing 13 changed files with 701 additions and 176 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dev": "./scripts/dev",
"lint": "./scripts/lint",
"make-assets": "./scripts/make-assets",
"prettier": "prettier 'src/**/*.[tj]s'",
"prettier": "prettier 'src/**/*.[tj]s' 'postgraphiql/src/**/*.[tj]s'",
"prettier:fix": "yarn prettier --write",
"prettier:check": "yarn prettier --list-different",
"test": "./scripts/test",
Expand All @@ -48,6 +48,7 @@
"@types/jsonwebtoken": "<7.2.1",
"@types/koa": "^2.0.44",
"@types/pg": "^7.4.10",
"@types/ws": "^6.0.1",
"body-parser": "^1.15.2",
"chalk": "^1.1.3",
"commander": "^2.19.0",
Expand All @@ -62,7 +63,9 @@
"pg-connection-string": "^0.1.3",
"pg-sql2": "^2.2.1",
"postgraphile-core": "4.3.1",
"tslib": "^1.5.0"
"subscriptions-transport-ws": "^0.9.15",
"tslib": "^1.5.0",
"ws": "^6.1.3"
},
"devDependencies": {
"@babel/core": "7.0.0",
Expand Down
4 changes: 2 additions & 2 deletions postgraphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"graphiql": "npm:@benjie/graphiql@0.12.1-a701b68f61a315280ba3e292275757f37e004ad5",
"graphiql-explorer": "^0.3.6",
"graphql": "^14.0.2",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react": "^16.8.1",
"react-dom": "^16.8.1",
"react-scripts": "^2.1.3"
},
"browserslist": [
Expand Down

0 comments on commit ede614c

Please sign in to comment.