tmp-graphql-config-extension-openapi

[![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 in past

Stats

StarsIssuesVersionUpdatedCreatedSize
tmp-graphql-config-extension-openapi
0111.0.74 years ago4 years agoMinified + gzip package size for tmp-graphql-config-extension-openapi in KB

Readme

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.