talawa-api / Exports / utilities/graphQLConnection/generateDefaultGraphQLConnection
Module: utilities/graphQLConnection/generateDefaultGraphQLConnection
Table of contents
Type Aliases
Functions
Type Aliases
DefaultGraphQLConnection
Ƭ DefaultGraphQLConnection<T0
>: Object
This is typescript type of a base graphQL connection object. This connection object can be extended to create a custom connnection object as long as the new connection object adheres to the default type of this base connection object.
Type parameters
Name |
---|
T0 |
Type declaration
Name | Type |
---|---|
edges | DefaultGraphQLConnectionEdge <T0 >[] |
pageInfo | ConnectionPageInfo |
totalCount | number |
Defined in
src/utilities/graphQLConnection/generateDefaultGraphQLConnection.ts:18
DefaultGraphQLConnectionEdge
Ƭ DefaultGraphQLConnectionEdge<T0
>: Object
This is typescript type of a base graphQL connection edge object. This connection edge object can be extended to create a custom connection edge object as long as the new connection edge object adheres to the default type of this base connection edge object.
Type parameters
Name |
---|
T0 |
Type declaration
Name | Type |
---|---|
cursor | string |
node | T0 |
Defined in
src/utilities/graphQLConnection/generateDefaultGraphQLConnection.ts:8
Functions
generateDefaultGraphQLConnection
▸ generateDefaultGraphQLConnection<T0
>(): DefaultGraphQLConnection
<T0
>
This is a factory function to create a base graphql connection object with default fields that correspond to a connection with no data and no traversal properties in any direction.
Type parameters
Name |
---|
T0 |
Returns
Example
const connection = generateDefaultGraphQLConnection();
Defined in
src/utilities/graphQLConnection/generateDefaultGraphQLConnection.ts:30