Docs
API Reference
Classes
UrlLoader

Class: UrlLoader

loaders/url/src.UrlLoader

This loader loads a schema from a URL. The loaded schema is a fully-executable, remote schema since it's created using @graphql-tools/wrap.

const schema = await loadSchema('http://localhost:3000/graphql', {
  loaders: [
    new UrlLoader(),
  ]
});

Hierarchy

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new UrlLoader()

Methods

buildHTTPExecutor

buildHTTPExecutor(endpoint, fetchFn, options?): SyncExecutor<any, ExecutionExtensions>

Parameters

NameType
endpointstring
fetchFnSyncFetchFn
options?LoadFromUrlOptions

Returns

SyncExecutor<any, ExecutionExtensions>

Defined in

packages/loaders/url/src/index.ts:124 (opens in a new tab)

buildHTTPExecutor(endpoint, fetchFn, options?): AsyncExecutor<any, ExecutionExtensions>

Parameters

NameType
endpointstring
fetchFnAsyncFetchFn
options?LoadFromUrlOptions

Returns

AsyncExecutor<any, ExecutionExtensions>

Defined in

packages/loaders/url/src/index.ts:130 (opens in a new tab)


buildSubscriptionExecutor

buildSubscriptionExecutor(subscriptionsEndpoint, fetch, syncImport, options?): SyncExecutor<Record<string, any>, Record<string, any>>

Parameters

NameType
subscriptionsEndpointstring
fetchSyncFetchFn
syncImportSyncImportFn
options?LoadFromUrlOptions

Returns

SyncExecutor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:236 (opens in a new tab)

buildSubscriptionExecutor(subscriptionsEndpoint, fetch, asyncImport, options?): AsyncExecutor<Record<string, any>, Record<string, any>>

Parameters

NameType
subscriptionsEndpointstring
fetchAsyncFetchFn
asyncImportAsyncImportFn
options?LoadFromUrlOptions

Returns

AsyncExecutor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:243 (opens in a new tab)


buildWSExecutor

buildWSExecutor(subscriptionsEndpoint, webSocketImpl, connectionParams?): Executor<Record<string, any>, Record<string, any>>

Parameters

NameType
subscriptionsEndpointstring
webSocketImpltypeof WebSocket
connectionParams?Record<string, any>

Returns

Executor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:153 (opens in a new tab)


buildWSLegacyExecutor

buildWSLegacyExecutor(subscriptionsEndpoint, WebSocketImpl, options?): Executor<Record<string, any>, Record<string, any>>

Parameters

NameType
subscriptionsEndpointstring
WebSocketImpltypeof WebSocket
options?LoadFromUrlOptions

Returns

Executor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:169 (opens in a new tab)


getExecutor

getExecutor(endpoint, asyncImport, options?): AsyncExecutor<Record<string, any>, Record<string, any>>

Parameters

NameType
endpointstring
asyncImportAsyncImportFn
options?Omit<LoadFromUrlOptions, "endpoint">

Returns

AsyncExecutor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:278 (opens in a new tab)

getExecutor(endpoint, syncImport, options?): SyncExecutor<Record<string, any>, Record<string, any>>

Parameters

NameType
endpointstring
syncImportSyncImportFn
options?Omit<LoadFromUrlOptions, "endpoint">

Returns

SyncExecutor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:284 (opens in a new tab)


getExecutorAsync

getExecutorAsync(endpoint, options?): AsyncExecutor<Record<string, any>, Record<string, any>>

Parameters

NameType
endpointstring
options?Omit<LoadFromUrlOptions, "endpoint">

Returns

AsyncExecutor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:327 (opens in a new tab)


getExecutorSync

getExecutorSync(endpoint, options?): SyncExecutor<Record<string, any>, Record<string, any>>

Parameters

NameType
endpointstring
options?Omit<LoadFromUrlOptions, "endpoint">

Returns

SyncExecutor<Record<string, any>, Record<string, any>>

Defined in

packages/loaders/url/src/index.ts:331 (opens in a new tab)


getFetch

getFetch(customFetch, importFn): AsyncFetchFn | PromiseLike<AsyncFetchFn>

Parameters

NameType
customFetchundefined | string | FetchFn
importFnAsyncImportFn

Returns

AsyncFetchFn | PromiseLike<AsyncFetchFn>

Defined in

packages/loaders/url/src/index.ts:182 (opens in a new tab)

getFetch(customFetch, importFn): SyncFetchFn

Parameters

NameType
customFetchundefined | string | FetchFn
importFnSyncImportFn

Returns

SyncFetchFn

Defined in

packages/loaders/url/src/index.ts:187 (opens in a new tab)


getWebSocketImpl

getWebSocketImpl(importFn, options?): PromiseLike<typeof WebSocket>

Parameters

NameType
importFnAsyncImportFn
options?LoadFromUrlOptions

Returns

PromiseLike<typeof WebSocket>

Defined in

packages/loaders/url/src/index.ts:217 (opens in a new tab)

getWebSocketImpl(importFn, options?): typeof WebSocket

Parameters

NameType
importFnSyncImportFn
options?LoadFromUrlOptions

Returns

typeof WebSocket

Defined in

packages/loaders/url/src/index.ts:219 (opens in a new tab)


handleSDL

handleSDL(pointer, fetch, options): Source

Parameters

NameType
pointerstring
fetchSyncFetchFn
optionsLoadFromUrlOptions

Returns

Source

Defined in

packages/loaders/url/src/index.ts:335 (opens in a new tab)

handleSDL(pointer, fetch, options): Promise<Source>

Parameters

NameType
pointerstring
fetchAsyncFetchFn
optionsLoadFromUrlOptions

Returns

Promise<Source>

Defined in

packages/loaders/url/src/index.ts:336 (opens in a new tab)


load

load(pointer, options): Promise<Source[]>

Parameters

NameType
pointerstring
optionsLoadFromUrlOptions

Returns

Promise<Source[]>

Implementation of

Loader.load

Defined in

packages/loaders/url/src/index.ts:350 (opens in a new tab)


loadSync

loadSync(pointer, options): Source[]

Parameters

NameType
pointerstring
optionsLoadFromUrlOptions

Returns

Source[]

Implementation of

Loader.loadSync

Defined in

packages/loaders/url/src/index.ts:395 (opens in a new tab)