loaders_prisma_src.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(): PrismaLoader

Returns: PrismaLoader

Inherited from: UrlLoader

Methods#

buildExecutor#

buildExecutor(options: BuildExecutorOptions<SyncFetchFn\>): SyncExecutor

Parameters:#

NameType
optionsBuildExecutorOptions<SyncFetchFn\>

Returns: SyncExecutor

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:167

buildExecutor(options: BuildExecutorOptions<(input: RequestInfo, init?: RequestInit) => Promise<Response\>\>): AsyncExecutor

Parameters:#

NameType
optionsBuildExecutorOptions<(input: RequestInfo, init?: RequestInit) => Promise<Response\>\>

Returns: AsyncExecutor

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:168


buildSSESubscriber#

buildSSESubscriber(pointer: string, eventSourceOptions?: { [key: string]: any; withCredentials?: boolean }): Subscriber

Parameters:#

NameType
pointerstring
eventSourceOptions?{ [key: string]: any; withCredentials?: boolean }

Returns: Subscriber

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:279


buildWSSubscriber#

buildWSSubscriber(pointer: string, webSocketImpl: typeof WebSocket): Subscriber

Parameters:#

NameType
pointerstring
webSocketImpltypeof WebSocket

Returns: Subscriber

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:251


canLoad#

canLoad(prismaConfigFilePath: string, options: PrismaLoaderOptions): Promise<boolean\>

Parameters:#

NameType
prismaConfigFilePathstring
optionsPrismaLoaderOptions

Returns: Promise<boolean\>

Overrides: UrlLoader

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


canLoadSync#

canLoadSync(pointer: string, _options: LoadFromUrlOptions): boolean

Parameters:#

NameType
pointerstring
_optionsLoadFromUrlOptions

Returns: boolean

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:114


createFormDataFromVariables#

createFormDataFromVariables<TVariables\>(__namedParameters: { query: string ; variables: TVariables }): Promise<FormDataWithStreamSupport\>

Type parameters:#

Name
TVariables

Parameters:#

NameType
__namedParameters{ query: string ; variables: TVariables }

Returns: Promise<FormDataWithStreamSupport\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:118


getExecutorAndSubscriberAsync#

getExecutorAndSubscriberAsync(pointer: string, options: LoadFromUrlOptions): Promise<{ executor: AsyncExecutor ; subscriber: Subscriber }\>

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: Promise<{ executor: AsyncExecutor ; subscriber: Subscriber }\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:382


getExecutorAndSubscriberSync#

getExecutorAndSubscriberSync(pointer: string, options: LoadFromUrlOptions): object

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: object

NameType
executorSyncExecutor
subscriberSubscriber

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:419


getFetch#

getFetch(customFetch: string | (input: RequestInfo, init?: RequestInit) => Promise<Response\> | SyncFetchFn, importFn: AsyncImportFn<unknown\>, async: true): PromiseLike<(input: RequestInfo, init?: RequestInit) => Promise<Response\>\>

Parameters:#

NameType
customFetchstring | (input: RequestInfo, init?: RequestInit) => Promise<Response\> | SyncFetchFn
importFnAsyncImportFn<unknown\>
asynctrue

Returns: PromiseLike<(input: RequestInfo, init?: RequestInit) => Promise<Response\>\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:312

getFetch(customFetch: string | (input: RequestInfo, init?: RequestInit) => Promise<Response\> | SyncFetchFn, importFn: SyncImportFn<unknown\>, async: false): SyncFetchFn

Parameters:#

NameType
customFetchstring | (input: RequestInfo, init?: RequestInit) => Promise<Response\> | SyncFetchFn
importFnSyncImportFn<unknown\>
asyncfalse

Returns: SyncFetchFn

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:318


getSubschemaConfigAsync#

getSubschemaConfigAsync(pointer: string, options: LoadFromUrlOptions): Promise<SubschemaConfig<any, any, any\>\>

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: Promise<SubschemaConfig<any, any, any\>\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:454


getSubschemaConfigSync#

getSubschemaConfigSync(pointer: string, options: LoadFromUrlOptions): SubschemaConfig<any, any, any\>

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: SubschemaConfig<any, any, any\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:463


getWebSocketImpl#

getWebSocketImpl(options: LoadFromUrlOptions, importFn: AsyncImportFn<unknown\>): PromiseLike<typeof WebSocket\>

Parameters:#

NameType
optionsLoadFromUrlOptions
importFnAsyncImportFn<unknown\>

Returns: PromiseLike<typeof WebSocket\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:360

getWebSocketImpl(options: LoadFromUrlOptions, importFn: SyncImportFn<unknown\>): typeof WebSocket

Parameters:#

NameType
optionsLoadFromUrlOptions
importFnSyncImportFn<unknown\>

Returns: typeof WebSocket

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:362


handleSDLAsync#

handleSDLAsync(pointer: string, options: LoadFromUrlOptions): Promise<Source\>

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: Promise<Source\>

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:472


handleSDLSync#

handleSDLSync(pointer: string, options: LoadFromUrlOptions): Source

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: Source

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:491


load#

load(prismaConfigFilePath: string, options: PrismaLoaderOptions): Promise<Source\>

Parameters:#

NameType
prismaConfigFilePathstring
optionsPrismaLoaderOptions

Returns: Promise<Source\>

Overrides: UrlLoader

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


loadSync#

loadSync(pointer: string, options: LoadFromUrlOptions): Source

Parameters:#

NameType
pointerstring
optionsLoadFromUrlOptions

Returns: Source

Inherited from: UrlLoader

Defined in: packages/loaders/url/src/index.ts:525


loaderId#

loaderId(): string

Returns: string

Overrides: UrlLoader

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