Documentation
API Reference
Classes
GitLoader

graphql-tools-monorepo / loaders/git/src / GitLoader

Class: GitLoader

loaders/git/src.GitLoader

This loader loads a file from git.

const typeDefs = await loadTypedefs('git:someBranch:some/path/to/file.js', {
  loaders: [new GitLoader()],
})

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new GitLoader(): GitLoader

Returns

GitLoader

Methods

canLoad

canLoad(pointer): Promise<boolean>

Parameters

NameType
pointerstring

Returns

Promise<boolean>

Defined in

packages/loaders/git/src/index.ts:52


canLoadSync

canLoadSync(pointer): boolean

Parameters

NameType
pointerstring

Returns

boolean

Defined in

packages/loaders/git/src/index.ts:56


load

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

Parameters

NameType
pointerstring
optionsGitLoaderOptions

Returns

Promise<Source[]>

Implementation of

Loader.load

Defined in

packages/loaders/git/src/index.ts:161


loadSync

loadSync(pointer, options): Source[]

Parameters

NameType
pointerstring
optionsGitLoaderOptions

Returns

Source[]

Implementation of

Loader.loadSync

Defined in

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


resolveGlobs

resolveGlobs(glob, ignores): Promise<string[]>

Parameters

NameType
globstring
ignoresstring[]

Returns

Promise<string[]>

Defined in

packages/loaders/git/src/index.ts:60


resolveGlobsSync

resolveGlobsSync(glob, ignores): string[]

Parameters

NameType
globstring
ignoresstring[]

Returns

string[]

Defined in

packages/loaders/git/src/index.ts:99