Skip to content

garph / GarphSchema

Class: GarphSchema

Constructors

constructor

new GarphSchema(«destructured»?)

Parameters

NameType
«destructured»Object
› typesAnyType[]

Defined in

index.ts:625

Properties

nodeType

nodeType: GInterface<"Node", { id: GString<"ID"> }>

Defined in

index.ts:601


pageInfoArgs

pageInfoArgs: Object

Type declaration

NameType
afterGOptional<GString<"ID">>
beforeGOptional<GString<"ID">>
firstGOptional<GNumber<"Int">>
lastGOptional<GNumber<"Int">>

Defined in

index.ts:612


pageInfoType

pageInfoType: GType<"PageInfo", { endCursor: GOptional<GString<"String">> ; hasNextPage: GBoolean ; hasPreviousPage: GBoolean ; startCursor: GOptional<GString<"String">> }>

Defined in

index.ts:605


types

types: Map<string, AnyType>

Defined in

index.ts:599

Methods

boolean

boolean(): GBoolean

Returns

GBoolean

Defined in

index.ts:710


connection

connection<N, T>(name, shape): GType<string, { edges: GList<T> ; pageInfo: GType<"PageInfo", { endCursor: GOptional<GString<"String">> ; hasNextPage: GBoolean ; hasPreviousPage: GBoolean ; startCursor: GOptional<GString<"String">> }> }>

Type parameters

NameType
Nextends string
Textends Type<any, "Ref", T>

Parameters

NameType
nameN
shapeT

Returns

GType<string, { edges: GList<T> ; pageInfo: GType<"PageInfo", { endCursor: GOptional<GString<"String">> ; hasNextPage: GBoolean ; hasPreviousPage: GBoolean ; startCursor: GOptional<GString<"String">> }> }>

Defined in

index.ts:641


edge

edge<N, T>(name, shape): GType<N, { cursor: AnyString ; node: T }>

Type parameters

NameType
Nextends string
Textends Type<any, "Ref", T>

Parameters

NameType
nameN
shapeT

Returns

GType<N, { cursor: AnyString ; node: T }>

Defined in

index.ts:651


enumType

enumType<N, T>(name, args): GEnum<N, T>

Type parameters

NameType
Nextends string
Textends readonly string[] | TSEnumType

Parameters

NameType
nameN
argsT

Returns

GEnum<N, T>

Defined in

index.ts:670


float

float(): GNumber<"Float">

Returns

GNumber<"Float">

Defined in

index.ts:706


id

id(): GString<"ID">

Returns

GString<"ID">

Defined in

index.ts:698


inputType

inputType<N, T>(name, shape): GInput<N, T>

Type parameters

NameType
Nextends string
Textends AnyTypes

Parameters

NameType
nameN
shapeT

Returns

GInput<N, T>

Defined in

index.ts:664


int

int(): GNumber<"Int">

Returns

GNumber<"Int">

Defined in

index.ts:702


interface

interface<N, T>(name, shape): GInterface<N, T>

Type parameters

NameType
Nextends string
Textends AnyTypes

Parameters

NameType
nameN
shapeT

Returns

GInterface<N, T>

Defined in

index.ts:688


node

node<N, T>(name, shape): GType<N, T & { id: GString<"ID"> }>

Type parameters

NameType
Nextends string
Textends AnyTypes

Parameters

NameType
nameN
shapeT

Returns

GType<N, T & { id: GString<"ID"> }>

Defined in

index.ts:635


ref

ref<T>(ref): GRef<T>

Type parameters

Name
T

Parameters

NameType
refT

Returns

GRef<T>

Defined in

index.ts:716


registerType

registerType(type): void

Parameters

NameType
typeAnyType

Returns

void

Defined in

index.ts:619


scalarType

scalarType<I, O>(name, options?): GScalar<I, O>

Type parameters

Name
I
O

Parameters

NameType
namestring
options?ScalarOptions<I, O>

Returns

GScalar<I, O>

Defined in

index.ts:682


string

string(): GString<"String">

Returns

GString<"String">

Defined in

index.ts:694


type

type<N, T>(name, shape): GType<N, T>

Type parameters

NameType
Nextends string
Textends AnyTypes

Parameters

NameType
nameN
shapeT

Returns

GType<N, T>

Defined in

index.ts:629


unionType

unionType<N, T>(name, args): GUnion<N, T>

Type parameters

NameType
Nextends string
Textends AnyObjects

Parameters

NameType
nameN
argsT

Returns

GUnion<N, T>

Defined in

index.ts:676