Skip to content

Commit f090cfc

Browse files
committed
Fix CLI type issue
Signed-off-by: Alan Cha <Alan.cha1@ibm.com>
1 parent 9239a09 commit f090cfc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/openapi-to-graphql-cli/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ async function getRemoteFileSpec(uri): Promise<Oas3> {
218218
* @param {object} oas the OAS specification file
219219
* @param {number} port the port number to listen on on this server
220220
*/
221-
function startGraphQLServer<TSource, TContext, TArgs>(
221+
function startGraphQLServer<TSource, TContext, TArgs extends object>(
222222
oas: Oas3 | Oas2 | (Oas3 | Oas2)[],
223223
options: Options<TSource, TContext, TArgs>,
224224
port: number
@@ -241,7 +241,7 @@ function startGraphQLServer<TSource, TContext, TArgs>(
241241
app.use(
242242
'/graphql',
243243
graphqlHTTP({
244-
schema: schema,
244+
schema,
245245
graphiql: true
246246
})
247247
)

packages/openapi-to-graphql/test/example_gql_server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const { graphqlHTTP } = require('express-graphql')
1111
const app = express()
1212
const openAPIToGraphQL = require('../dist/index')
1313

14-
const oas = require('./fixtures/example_oas.json')
14+
// const oas = require('./fixtures/example_oas.json')
1515
// const oas = require('./fixtures/example_oas2.json')
1616
// const oas = require('./fixtures/example_oas3.json')
1717
// const oas = require('./fixtures/example_oas4.json')
1818
// const oas = require('./fixtures/example_oas5.json')
1919
// const oas = require('./fixtures/example_oas6.json')
20-
// const oas = require('./fixtures/example_oas7.json')
20+
const oas = require('./fixtures/example_oas7.json')
2121
// const oas = require('./fixtures/example_oas8.json')
2222
// const oas = require('./fixtures/file_upload.json')
2323

0 commit comments

Comments
 (0)