talawa-api / Exports / utilities/graphqlConnectionFactory
Module: utilities/graphqlConnectionFactory
Table of contents
Functions
Functions
generateConnectionObject
▸ generateConnectionObject<T1
, T2
>(args
, allFetchedObjects
, getNodeFromResult
): InterfaceConnectionResult
<T1
>
Type parameters
Name | Type |
---|---|
T1 | extends Object |
T2 | extends Object |
Parameters
Name | Type |
---|---|
args | CursorPaginationInput |
allFetchedObjects | null | T2 [] |
getNodeFromResult | GetNodeFromResultFnType <T1 , T2 > |
Returns
InterfaceConnectionResult
<T1
>
Defined in
src/utilities/graphqlConnectionFactory.ts:106
getFilterObject
▸ getFilterObject(args
): FilterObjectType
| null
Parameters
Name | Type |
---|---|
args | CursorPaginationInput |
Returns
FilterObjectType
| null
Defined in
src/utilities/graphqlConnectionFactory.ts:75
getLimit
▸ getLimit(limit
): number
Parameters
Name | Type |
---|---|
limit | number |
Returns
number
Defined in
src/utilities/graphqlConnectionFactory.ts:46
getSortingObject
▸ getSortingObject(direction
, sortingObject
): Record
<string
, number
>
Parameters
Name | Type |
---|---|
direction | "BACKWARD" | "FORWARD" |
sortingObject | Record <string , number > |
Returns
Record
<string
, number
>
Defined in
src/utilities/graphqlConnectionFactory.ts:53
graphqlConnectionFactory
▸ graphqlConnectionFactory<T
>(): InterfaceConnection
<T
>
Type parameters
Name |
---|
T |
Returns
InterfaceConnection
<T
>