loaders_github_src.githubloader

Class: GithubLoader#

loaders/github/src.GithubLoader

This loader loads a file from GitHub.

const typeDefs = await loadTypedefs('github:githubUser/githubRepo#branchName:path/to/file.ts', {
loaders: [new GithubLoader()],
token: YOUR_GITHUB_TOKEN,
})

Hierarchy#

  • GithubLoader

Implements#

Table of contents#

Constructors#

Methods#

Constructors#

constructor#

+ new GithubLoader(): GithubLoader

Returns: GithubLoader

Methods#

canLoad#

canLoad(pointer: string): Promise<boolean\>

Parameters:#

NameType
pointerstring

Returns: Promise<boolean\>

Defined in: packages/loaders/github/src/index.ts:55


canLoadSync#

canLoadSync(): boolean

Returns: boolean

Defined in: packages/loaders/github/src/index.ts:59


load#

load(pointer: string, options: GithubLoaderOptions): Promise<Source | { document: DocumentNode ; location: string ; rawSDL: string }\>

Parameters:#

NameType
pointerstring
optionsGithubLoaderOptions

Returns: Promise<Source | { document: DocumentNode ; location: string ; rawSDL: string }\>

Defined in: packages/loaders/github/src/index.ts:63


loadSync#

loadSync(): never

Returns: never

Defined in: packages/loaders/github/src/index.ts:126


loaderId#

loaderId(): string

Returns: string

Defined in: packages/loaders/github/src/index.ts:51