garph / GarphSchema
Class: GarphSchema
Constructors
constructor
• new GarphSchema(«destructured»?
)
Parameters
Name | Type |
---|---|
«destructured» | Object |
› types | AnyType [] |
Defined in
Properties
nodeType
• nodeType: GInterface
<"Node"
, { id
: GString
<"ID"
> }>
Defined in
pageInfoArgs
• pageInfoArgs: Object
Type declaration
Name | Type |
---|---|
after | GOptional <GString <"ID" >> |
before | GOptional <GString <"ID" >> |
first | GOptional <GNumber <"Int" >> |
last | GOptional <GNumber <"Int" >> |
Defined in
pageInfoType
• pageInfoType: GType
<"PageInfo"
, { endCursor
: GOptional
<GString
<"String"
>> ; hasNextPage
: GBoolean
; hasPreviousPage
: GBoolean
; startCursor
: GOptional
<GString
<"String"
>> }>
Defined in
types
• types: Map
<string
, AnyType
>
Defined in
Methods
boolean
▸ boolean(): GBoolean
Returns
GBoolean
Defined in
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
Name | Type |
---|---|
N | extends string |
T | extends Type <any , "Ref" , T > |
Parameters
Name | Type |
---|---|
name | N |
shape | T |
Returns
GType
<string
, { edges
: GList
<T
> ; pageInfo
: GType
<"PageInfo"
, { endCursor
: GOptional
<GString
<"String"
>> ; hasNextPage
: GBoolean
; hasPreviousPage
: GBoolean
; startCursor
: GOptional
<GString
<"String"
>> }> }>
Defined in
edge
▸ edge<N
, T
>(name
, shape
): GType
<N
, { cursor
: AnyString
; node
: T
}>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends Type <any , "Ref" , T > |
Parameters
Name | Type |
---|---|
name | N |
shape | T |
Returns
GType
<N
, { cursor
: AnyString
; node
: T
}>
Defined in
enumType
▸ enumType<N
, T
>(name
, args
): GEnum
<N
, T
>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends readonly string [] | TSEnumType |
Parameters
Name | Type |
---|---|
name | N |
args | T |
Returns
GEnum
<N
, T
>
Defined in
float
▸ float(): GNumber
<"Float"
>
Returns
GNumber
<"Float"
>
Defined in
id
▸ id(): GString
<"ID"
>
Returns
GString
<"ID"
>
Defined in
inputType
▸ inputType<N
, T
>(name
, shape
): GInput
<N
, T
>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends AnyTypes |
Parameters
Name | Type |
---|---|
name | N |
shape | T |
Returns
GInput
<N
, T
>
Defined in
int
▸ int(): GNumber
<"Int"
>
Returns
GNumber
<"Int"
>
Defined in
interface
▸ interface<N
, T
>(name
, shape
): GInterface
<N
, T
>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends AnyTypes |
Parameters
Name | Type |
---|---|
name | N |
shape | T |
Returns
GInterface
<N
, T
>
Defined in
node
▸ node<N
, T
>(name
, shape
): GType
<N
, T
& { id
: GString
<"ID"
> }>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends AnyTypes |
Parameters
Name | Type |
---|---|
name | N |
shape | T |
Returns
GType
<N
, T
& { id
: GString
<"ID"
> }>
Defined in
ref
▸ ref<T
>(ref
): GRef
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
ref | T |
Returns
GRef
<T
>
Defined in
registerType
▸ registerType(type
): void
Parameters
Name | Type |
---|---|
type | AnyType |
Returns
void
Defined in
scalarType
▸ scalarType<I
, O
>(name
, options?
): GScalar
<I
, O
>
Type parameters
Name |
---|
I |
O |
Parameters
Name | Type |
---|---|
name | string |
options? | ScalarOptions <I , O > |
Returns
GScalar
<I
, O
>
Defined in
string
▸ string(): GString
<"String"
>
Returns
GString
<"String"
>
Defined in
type
▸ type<N
, T
>(name
, shape
): GType
<N
, T
>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends AnyTypes |
Parameters
Name | Type |
---|---|
name | N |
shape | T |
Returns
GType
<N
, T
>
Defined in
unionType
▸ unionType<N
, T
>(name
, args
): GUnion
<N
, T
>
Type parameters
Name | Type |
---|---|
N | extends string |
T | extends AnyObjects |
Parameters
Name | Type |
---|---|
name | N |
args | T |
Returns
GUnion
<N
, T
>