graphql-tools-monorepo / loaders/module/src / ModuleLoader
Class: ModuleLoader
loaders/module/src.ModuleLoader
- This loader loads documents and type definitions from a Node module
const schema = await loadSchema('module:someModuleName#someNamedExport', {
loaders: [new ModuleLoader()],
})
Implements
Table of contents
Constructors
Methods
Constructors
constructor
• new ModuleLoader(): ModuleLoader
Returns
Methods
canLoad
▸ canLoad(pointer
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
pointer | string |
Returns
Promise
<boolean
>
Defined in
packages/loaders/module/src/index.ts:44
canLoadSync
▸ canLoadSync(pointer
): boolean
Parameters
Name | Type |
---|---|
pointer | string |
Returns
boolean
Defined in
packages/loaders/module/src/index.ts:58
load
▸ load(pointer
): Promise
<Source
[]>
Parameters
Name | Type |
---|---|
pointer | string |
Returns
Promise
<Source
[]>
Implementation of
Defined in
packages/loaders/module/src/index.ts:71
loadSync
▸ loadSync(pointer
): Source
[]
Parameters
Name | Type |
---|---|
pointer | string |
Returns
Source
[]