Docs
API
Modules
loaders_openapi_src

Table of contents

References

Interfaces

Functions

References

OpenAPILoaderBundle

Renames and re-exports JSONSchemaLoaderBundle


getGraphQLSchemaFromBundle

Re-exports getGraphQLSchemaFromBundle

Functions

createBundle

createBundle(name, openApiLoaderOptions): Promise<JSONSchemaLoaderBundle>

Creates a bundle by downloading and resolving the internal references once to load the schema locally later

Parameters

NameType
namestring
openApiLoaderOptionsOpenAPILoaderOptions

Returns

Promise<JSONSchemaLoaderBundle>


getJSONSchemaOptionsFromOpenAPIOptions

getJSONSchemaOptionsFromOpenAPIOptions(__namedParameters): Promise<{ baseUrl: string ; cwd: string ; fetch: (input: URL | RequestInfo, init?: RequestInit) => Promise<Response> = fetchFn; operationHeaders: OperationHeadersConfiguration ; operations: JSONSchemaOperationConfig[] ; schemaHeaders: Record<string, string> }>

Parameters

NameType
__namedParametersGetJSONSchemaOptionsFromOpenAPIOptionsParams

Returns

Promise<{ baseUrl: string ; cwd: string ; fetch: (input: URL | RequestInfo, init?: RequestInit) => Promise<Response> = fetchFn; operationHeaders: OperationHeadersConfiguration ; operations: JSONSchemaOperationConfig[] ; schemaHeaders: Record<string, string> }>


loadGraphQLSchemaFromOpenAPI

loadGraphQLSchemaFromOpenAPI(name, options): Promise<GraphQLSchema>

Creates a local GraphQLSchema instance from a OpenAPI Document. Everytime this function is called, the OpenAPI file and its dependencies will be resolved on runtime. If you want to avoid this, use createBundle function to create a bundle once and save it to a storage then load it with loadGraphQLSchemaFromBundle.

Parameters

NameType
namestring
optionsOpenAPILoaderOptions

Returns

Promise<GraphQLSchema>