tmp-graphql-config-extension-openapi
v1.0.7
Published
[![CircleCI](https://circleci.com/gh/graphql-config/graphql-config-extension-openapi.svg?style=shield)](https://circleci.com/gh/graphql-config/graphql-config-extension-openapi) [![npm version](https://badge.fury.io/js/graphql-config-extension-openapi.svg)
Downloads
26,353
Readme
graphql-config-extension-openapi
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.