openapi-to-graphql-lxwang2
Version:
Generates a GraphQL schema for a given OpenAPI Specification (OAS)
25 lines (19 loc) • 624 B
text/typescript
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: openapi-to-graphql
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
/* globals test, expect */
import * as openAPIToGraphQL from '../lib/index'
import { Options } from '../lib/types/options'
const oas = require('./fixtures/docusign.json')
test('Generate schema without problems', () => {
const options: Options = {
strict: false
}
return openAPIToGraphQL
.createGraphQLSchema(oas, options)
.then(({ schema }) => {
expect(schema).toBeTruthy()
})
})