graphql-config-extension-openapi
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

graphql-config-extension-openapi

CircleCI npm version

Injects endpoints into a GraphQL Config instance based on a given OpenAPI definition to retrieve the schema.

Usage in .graphqlconfig.yml

projects:
  petstore:
    extensions:
      openapi: 
        definition: petstore.json

Usage in Node.js

import {patchEndpointsToConfig} from 'graphql-config-extension-openapi'
import {getGraphQLConfig, GraphQLConfigData} from 'graphql-config'

const config: GraphQLConfigData = getGraphQLConfig().config
const patchedConfig: GraphQLConfigData = patchEndpointsToConfig(config, process.cwd())

Current Usages

This is currently being used in graphql-cli to provide get-schema functionality for OpenAPI endpoints.

Readme

Keywords

none

Package Sidebar

Install

npm i graphql-config-extension-openapi

Weekly Downloads

996

Version

1.0.6

License

MIT

Unpacked Size

16.4 kB

Total Files

9

Last publish

Collaborators

  • kbrandwijk