Table of contents
References
Interfaces
Functions
References
RAMLLoaderBundle
Renames and re-exports JSONSchemaLoaderBundle
getGraphQLSchemaFromBundle
Re-exports getGraphQLSchemaFromBundle
Functions
createBundle
▸ createBundle(name
, ramlLoaderOptions
): Promise
<JSONSchemaLoaderBundle
>
Creates a bundle by downloading and resolving the internal references once to load the schema locally later
Parameters
Name | Type |
---|---|
name | string |
ramlLoaderOptions | RAMLLoaderOptions |
Returns
Promise
<JSONSchemaLoaderBundle
>
getJSONSchemaOptionsFromRAMLOptions
▸ getJSONSchemaOptionsFromRAMLOptions(__namedParameters
): Promise
<{ baseUrl
: string
; cwd
: string
; fetch?
: WindowOrWorkerGlobalScope
["fetch"
] ; operations
: JSONSchemaOperationConfig
[] }>
Generates the options for JSON Schema Loader from RAML Loader options by extracting the JSON Schema references from RAML API Document
Parameters
Name | Type |
---|---|
__namedParameters | RAMLLoaderOptions |
Returns
Promise
<{ baseUrl
: string
; cwd
: string
; fetch?
: WindowOrWorkerGlobalScope
["fetch"
] ; operations
: JSONSchemaOperationConfig
[] }>
loadGraphQLSchemaFromRAML
▸ loadGraphQLSchemaFromRAML(name
, options
): Promise
<GraphQLSchema
>
Creates a local GraphQLSchema instance from a RAML API Document.
Everytime this function is called, the RAML 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
Name | Type |
---|---|
name | string |
options | RAMLLoaderOptions |
Returns
Promise
<GraphQLSchema
>