Class: UrlLoader
Defined in: packages/loaders/url/src/index.ts:125
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(),
]
});Implements
Constructors
Constructor
new UrlLoader():
UrlLoader
Returns
UrlLoader
Methods
buildHTTPExecutor()
Call Signature
buildHTTPExecutor(
endpoint,fetchFn,options?):SyncExecutor<any,ExecutionExtensions>
Defined in: packages/loaders/url/src/index.ts:126
Parameters
endpoint
string
fetchFn
SyncFetchFn
options?
Returns
SyncExecutor<any, ExecutionExtensions>
Call Signature
buildHTTPExecutor(
endpoint,fetchFn,options?):AsyncExecutor<any,ExecutionExtensions>
Defined in: packages/loaders/url/src/index.ts:132
Parameters
endpoint
string
fetchFn
AsyncFetchFn
options?
Returns
AsyncExecutor<any, ExecutionExtensions>
buildSubscriptionExecutor()
Call Signature
buildSubscriptionExecutor(
subscriptionsEndpoint,fetch,syncImport,options?):SyncExecutor
Defined in: packages/loaders/url/src/index.ts:247
Parameters
subscriptionsEndpoint
string
fetch
SyncFetchFn
syncImport
options?
Returns
Call Signature
buildSubscriptionExecutor(
subscriptionsEndpoint,fetch,asyncImport,options?):AsyncExecutor
Defined in: packages/loaders/url/src/index.ts:254
Parameters
subscriptionsEndpoint
string
fetch
AsyncFetchFn
asyncImport
options?
Returns
buildWSExecutor()
buildWSExecutor(
subscriptionsEndpoint,webSocketImpl,connectionParams?):Executor
Defined in: packages/loaders/url/src/index.ts:155
Parameters
subscriptionsEndpoint
string
webSocketImpl
typeof WebSocket
connectionParams?
Record<string, unknown> | (() => Record<string, unknown>)
Returns
buildWSLegacyExecutor()
buildWSLegacyExecutor(
subscriptionsEndpoint,WebSocketImpl,options?):Executor
Defined in: packages/loaders/url/src/index.ts:172
Parameters
subscriptionsEndpoint
string
WebSocketImpl
typeof WebSocket
options?
Returns
getExecutor()
Call Signature
getExecutor(
endpoint,asyncImport,options?):AsyncExecutor
Defined in: packages/loaders/url/src/index.ts:299
Parameters
endpoint
string
asyncImport
options?
Omit<LoadFromUrlOptions, "endpoint">
Returns
Call Signature
getExecutor(
endpoint,syncImport,options?):SyncExecutor
Defined in: packages/loaders/url/src/index.ts:305
Parameters
endpoint
string
syncImport
options?
Omit<LoadFromUrlOptions, "endpoint">
Returns
getExecutorAsync()
getExecutorAsync(
endpoint,options?):AsyncExecutor
Defined in: packages/loaders/url/src/index.ts:365
Parameters
endpoint
string
options?
Omit<LoadFromUrlOptions, "endpoint">
Returns
getExecutorSync()
getExecutorSync(
endpoint,options?):SyncExecutor
Defined in: packages/loaders/url/src/index.ts:372
Parameters
endpoint
string
options?
Omit<LoadFromUrlOptions, "endpoint">
Returns
getFetch()
Call Signature
getFetch(
customFetch,importFn):AsyncFetchFn|PromiseLike<AsyncFetchFn>
Defined in: packages/loaders/url/src/index.ts:185
Parameters
customFetch
string | FetchFn | undefined
importFn
Returns
AsyncFetchFn | PromiseLike<AsyncFetchFn>
Call Signature
getFetch(
customFetch,importFn):SyncFetchFn
Defined in: packages/loaders/url/src/index.ts:190
Parameters
customFetch
string | FetchFn | undefined
importFn
Returns
SyncFetchFn
getWebSocketImpl()
Call Signature
getWebSocketImpl(
importFn,options?):PromiseLike<typeofWebSocket>
Defined in: packages/loaders/url/src/index.ts:224
Parameters
importFn
options?
Returns
PromiseLike<typeof WebSocket>
Call Signature
getWebSocketImpl(
importFn,options?): typeofWebSocket
Defined in: packages/loaders/url/src/index.ts:229
Parameters
importFn
options?
Returns
typeof WebSocket
handleSDL()
Call Signature
handleSDL(
pointer,fetch,options):Source
Defined in: packages/loaders/url/src/index.ts:376
Parameters
pointer
string
fetch
SyncFetchFn
options
Returns
Call Signature
handleSDL(
pointer,fetch,options):Promise<Source>
Defined in: packages/loaders/url/src/index.ts:377
Parameters
pointer
string
fetch
AsyncFetchFn
options
Returns
Promise<Source>
load()
load(
pointer,options):Promise<Source[]>
Defined in: packages/loaders/url/src/index.ts:394
Parameters
pointer
string
options
Returns
Promise<Source[]>
Implementation of
loadSync()
loadSync(
pointer,options):Source[]
Defined in: packages/loaders/url/src/index.ts:439
Parameters
pointer
string
options
Returns
Source[]