Skip to content

Commit e34321d

Browse files
getlargeAlan-Cha
authored andcommitted
fix subscription test and example
Signed-off-by: getlarge <[email protected]>
1 parent eca35cc commit e34321d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/openapi-to-graphql/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
"types": "lib/index.d.ts",
4141
"scripts": {
4242
"api": "nodemon test/example_api_server.js",
43-
"api-5": "nodemon test/example_api5_server.js",
43+
"api_sub": "nodemon test/example_api5_server.js",
4444
"dev": "tsc -w",
4545
"start_dev": "DEBUG=preprocessing,translation,http nodemon test/example_gql_server.js",
46-
"start_dev_2": "DEBUG=preprocessing,translation,http,pubsub nodemon test/example_gql_server2.js",
46+
"start_dev_sub": "DEBUG=preprocessing,translation,http,pubsub nodemon test/example_gql_server_ws.js",
4747
"build": "tsc",
4848
"guru-load": "node test/evaluation/load_apis_guru.js",
4949
"guru-test": "DEBUG=preprocessing,translation node test/evaluation/eval_apis_guru.js",

packages/openapi-to-graphql/test/example_gql_server2.js renamed to packages/openapi-to-graphql/test/example_gql_server_ws.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ const openAPIToGraphQL = require('../lib/index')
1010
const oas5 = require('./fixtures/example_oas5.json')
1111

1212
const HTTP_PORT = 3000
13-
const WS_PORT = 4000
1413
const app = express()
1514

1615
openAPIToGraphQL
1716
.createGraphQLSchema(oas5, {
18-
fillEmptyResponses: true
17+
fillEmptyResponses: true,
18+
createSubscriptionsFromCallbacks: true
1919
// operationIdFieldNames: true
2020
})
2121
.then(({ schema, report }) => {

0 commit comments

Comments
 (0)