• Docs
  • API Reference
  • Classes
  • PrismaLoader

Class: PrismaLoader

loaders/prisma/src.PrismaLoader

This loader loads a schema from a prisma.yml file

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new PrismaLoader()

Inherited from

UrlLoader.constructor

Methods

buildHTTPExecutor

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

Parameters

NameType
endpointstring
fetchFnSyncFetchFn
options?LoadFromUrlOptions

Returns

SyncExecutor<any, ExecutionExtensions>

Inherited from

UrlLoader.buildHTTPExecutor

Defined in

packages/loaders/url/src/index.ts:124

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

Parameters

NameType
endpointstring
fetchFnAsyncFetchFn
options?LoadFromUrlOptions

Returns

AsyncExecutor<any, ExecutionExtensions>

Inherited from

UrlLoader.buildHTTPExecutor

Defined in

packages/loaders/url/src/index.ts:130


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>>

Inherited from

UrlLoader.buildSubscriptionExecutor

Defined in

packages/loaders/url/src/index.ts:232

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>>

Inherited from

UrlLoader.buildSubscriptionExecutor

Defined in

packages/loaders/url/src/index.ts:239


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>>

Inherited from

UrlLoader.buildWSExecutor

Defined in

packages/loaders/url/src/index.ts:153


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>>

Inherited from

UrlLoader.buildWSLegacyExecutor

Defined in

packages/loaders/url/src/index.ts:165


canLoad

canLoad(prismaConfigFilePath, options): Promise<boolean>

Parameters

NameType
prismaConfigFilePathstring
optionsPrismaLoaderOptions

Returns

Promise<boolean>

Defined in

packages/loaders/prisma/src/index.ts:27


canLoadSync

canLoadSync(): boolean

Returns

boolean

Defined in

packages/loaders/prisma/src/index.ts:23


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>>

Inherited from

UrlLoader.getExecutor

Defined in

packages/loaders/url/src/index.ts:274

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>>

Inherited from

UrlLoader.getExecutor

Defined in

packages/loaders/url/src/index.ts:280


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>>

Inherited from

UrlLoader.getExecutorAsync

Defined in

packages/loaders/url/src/index.ts:317


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>>

Inherited from

UrlLoader.getExecutorSync

Defined in

packages/loaders/url/src/index.ts:321


getFetch

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

Parameters

NameType
customFetchundefined | string | FetchFn
importFnAsyncImportFn

Returns

AsyncFetchFn | PromiseLike<AsyncFetchFn>

Inherited from

UrlLoader.getFetch

Defined in

packages/loaders/url/src/index.ts:178

getFetch(customFetch, importFn): SyncFetchFn

Parameters

NameType
customFetchundefined | string | FetchFn
importFnSyncImportFn

Returns

SyncFetchFn

Inherited from

UrlLoader.getFetch

Defined in

packages/loaders/url/src/index.ts:183


getWebSocketImpl

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

Parameters

NameType
importFnAsyncImportFn
options?LoadFromUrlOptions

Returns

PromiseLike<typeof WebSocket>

Inherited from

UrlLoader.getWebSocketImpl

Defined in

packages/loaders/url/src/index.ts:213

getWebSocketImpl(importFn, options?): typeof WebSocket

Parameters

NameType
importFnSyncImportFn
options?LoadFromUrlOptions

Returns

typeof WebSocket

Inherited from

UrlLoader.getWebSocketImpl

Defined in

packages/loaders/url/src/index.ts:215


handleSDL

handleSDL(pointer, fetch, options): Source

Parameters

NameType
pointerstring
fetchSyncFetchFn
optionsLoadFromUrlOptions

Returns

Source

Inherited from

UrlLoader.handleSDL

Defined in

packages/loaders/url/src/index.ts:325

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

Parameters

NameType
pointerstring
fetchAsyncFetchFn
optionsLoadFromUrlOptions

Returns

Promise<Source>

Inherited from

UrlLoader.handleSDL

Defined in

packages/loaders/url/src/index.ts:326


load

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

Parameters

NameType
prismaConfigFilePathstring
optionsPrismaLoaderOptions

Returns

Promise<Source[]>

Overrides

UrlLoader.load

Defined in

packages/loaders/prisma/src/index.ts:40


loadSync

loadSync(pointer, options): Source[]

Parameters

NameType
pointerstring
optionsLoadFromUrlOptions

Returns

Source[]

Inherited from

UrlLoader.loadSync

Defined in

packages/loaders/url/src/index.ts:385