Docs
API
Modules
loaders_json_schema_src

Table of contents

References

Interfaces

Type Aliases

Variables

Functions

References

src

Renames and re-exports loadGraphQLSchemaFromJSONSchemas

Type Aliases

HTTPMethod

Ƭ HTTPMethod: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH"

Defined in

packages/loaders/json-schema/src/types.ts:60


JSONSchemaBaseOperationConfig

Ƭ JSONSchemaBaseOperationConfig: { argTypeMap?: Record<string, string | GraphQLInputType> ; description?: string ; field: string ; type: OperationTypeNode } & { responseByStatusCode?: Record<string, JSONSchemaOperationResponseConfig> } | JSONSchemaOperationResponseConfig

Defined in

packages/loaders/json-schema/src/types.ts:40


JSONSchemaBaseOperationConfigWithJSONRequest

Ƭ JSONSchemaBaseOperationConfigWithJSONRequest: JSONSchemaBaseOperationConfig & { requestBaseBody?: any ; requestSample?: any ; requestSchema?: string | JSONSchema ; requestTypeName?: string }

Defined in

packages/loaders/json-schema/src/types.ts:53


JSONSchemaHTTPBaseOperationConfig

Ƭ JSONSchemaHTTPBaseOperationConfig: JSONSchemaBaseOperationConfig & { headers?: Record<string, string> ; method?: HTTPMethod ; path: string }

Defined in

packages/loaders/json-schema/src/types.ts:62


JSONSchemaHTTPBinaryConfig

Ƭ JSONSchemaHTTPBinaryConfig: JSONSchemaHTTPBaseOperationConfig & { binary: true ; method?: HTTPMethod ; path: string ; requestTypeName?: string }

Defined in

packages/loaders/json-schema/src/types.ts:76


JSONSchemaHTTPJSONOperationConfig

Ƭ JSONSchemaHTTPJSONOperationConfig: JSONSchemaHTTPBaseOperationConfig & JSONSchemaBaseOperationConfigWithJSONRequest

Defined in

packages/loaders/json-schema/src/types.ts:69


JSONSchemaOperationConfig

Ƭ JSONSchemaOperationConfig: JSONSchemaHTTPJSONOperationConfig | JSONSchemaHTTPBinaryConfig | JSONSchemaPubSubOperationConfig

Defined in

packages/loaders/json-schema/src/types.ts:83


JSONSchemaPubSubOperationConfig

Ƭ JSONSchemaPubSubOperationConfig: JSONSchemaBaseOperationConfigWithJSONRequest & { pubsubTopic: string }

Defined in

packages/loaders/json-schema/src/types.ts:72


OperationHeadersConfiguration

Ƭ OperationHeadersConfiguration: Record<string, string> | (data: ResolverData) => PromiseOrValue<Record<string, string>>

Defined in

packages/loaders/json-schema/src/types.ts:88

Variables

anySchema

Const anySchema: JSONSchemaObject

Defined in

packages/loaders/json-schema/src/getReferencedJSONSchemaFromOperations.ts:9

Functions

createBundle

createBundle(name, __namedParameters): Promise<JSONSchemaLoaderBundle>

Parameters

NameType
namestring
__namedParametersJSONSchemaLoaderBundleOptions

Returns

Promise<JSONSchemaLoaderBundle>


getComposerFromJSONSchema

getComposerFromJSONSchema(schema, logger): Promise<TypeComposers>

Parameters

NameType
schemaJSONSchema
loggerLogger

Returns

Promise<TypeComposers>


getDereferencedJSONSchemaFromOperations

getDereferencedJSONSchemaFromOperations(__namedParameters): Promise<JSONSchemaObject>

Parameters

NameType
__namedParametersObject
__namedParameters.cwdstring
__namedParameters.fetchFn(input: URL | RequestInfo, init?: RequestInit) => Promise<Response>
__namedParameters.ignoreErrorResponses?boolean
__namedParameters.loggerLogger
__namedParameters.noDeduplication?boolean
__namedParameters.operationsJSONSchemaOperationConfig[]
__namedParameters.schemaHeaders?Record<string, string>

Returns

Promise<JSONSchemaObject>


getGraphQLSchemaFromBundle

getGraphQLSchemaFromBundle(__namedParameters, __namedParameters?): Promise<GraphQLSchema>

Generates a local GraphQLSchema instance from previously generated JSON Schema bundle

Parameters

Returns

Promise<GraphQLSchema>


getGraphQLSchemaFromDereferencedJSONSchema

getGraphQLSchemaFromDereferencedJSONSchema(fullyDeferencedSchema, __namedParameters): Promise<GraphQLSchema>

Parameters

NameType
fullyDeferencedSchemaJSONSchemaObject
__namedParametersAddExecutionLogicToComposerOptions

Returns

Promise<GraphQLSchema>


getReferencedJSONSchemaFromOperations

getReferencedJSONSchemaFromOperations(__namedParameters): Promise<JSONSchemaObject>

Parameters

NameType
__namedParametersObject
__namedParameters.cwdstring
__namedParameters.fetchFn(input: URL | RequestInfo, init?: RequestInit) => Promise<Response>
__namedParameters.ignoreErrorResponses?boolean
__namedParameters.logger?Logger
__namedParameters.operationsJSONSchemaOperationConfig[]
__namedParameters.schemaHeaders?Object

Returns

Promise<JSONSchemaObject>


loadGraphQLSchemaFromJSONSchemas

loadGraphQLSchemaFromJSONSchemas(name, options): Promise<GraphQLSchema>

Parameters

NameType
namestring
optionsJSONSchemaLoaderOptions

Returns

Promise<GraphQLSchema>