Skip to main content

talawa-api / Exports / utilities/graphQLConnection

Module: utilities/graphQLConnection

Table of contents

References

Type Aliases

Functions

References

CreateCursor

Re-exports CreateCursor


CreateNode

Re-exports CreateNode


DefaultGraphQLConnection

Re-exports DefaultGraphQLConnection


DefaultGraphQLConnectionEdge

Re-exports DefaultGraphQLConnectionEdge


ParseGraphQLConnectionArgumentsResult

Re-exports ParseGraphQLConnectionArgumentsResult


ParseGraphQLConnectionArgumentsWithSortedByAndWhereResult

Re-exports ParseGraphQLConnectionArgumentsWithSortedByAndWhereResult


ParseGraphQLConnectionArgumentsWithSortedByResult

Re-exports ParseGraphQLConnectionArgumentsWithSortedByResult


ParseGraphQLConnectionArgumentsWithWhereResult

Re-exports ParseGraphQLConnectionArgumentsWithWhereResult


ParseGraphQLConnectionCursor

Re-exports ParseGraphQLConnectionCursor


ParseGraphQLConnectionCursorArguments

Re-exports ParseGraphQLConnectionCursorArguments


ParseGraphQLConnectionCursorResult

Re-exports ParseGraphQLConnectionCursorResult


ParseGraphQLConnectionSortedByResult

Re-exports ParseGraphQLConnectionSortedByResult


ParseGraphQLConnectionWhereResult

Re-exports ParseGraphQLConnectionWhereResult


ParsedGraphQLConnectionArguments

Re-exports ParsedGraphQLConnectionArguments


ParsedGraphQLConnectionArgumentsWithSortedBy

Re-exports ParsedGraphQLConnectionArgumentsWithSortedBy


ParsedGraphQLConnectionArgumentsWithSortedByAndWhere

Re-exports ParsedGraphQLConnectionArgumentsWithSortedByAndWhere


ParsedGraphQLConnectionArgumentsWithWhere

Re-exports ParsedGraphQLConnectionArgumentsWithWhere


TransformToDefaultGraphQLConnectionArguments

Re-exports TransformToDefaultGraphQLConnectionArguments


generateDefaultGraphQLConnection

Re-exports generateDefaultGraphQLConnection


getCommonGraphQLConnectionFilter

Re-exports getCommonGraphQLConnectionFilter


getCommonGraphQLConnectionSort

Re-exports getCommonGraphQLConnectionSort


parseGraphQLConnectionArguments

Re-exports parseGraphQLConnectionArguments


parseGraphQLConnectionArgumentsWithSortedBy

Re-exports parseGraphQLConnectionArgumentsWithSortedBy


parseGraphQLConnectionArgumentsWithSortedByAndWhere

Re-exports parseGraphQLConnectionArgumentsWithSortedByAndWhere


parseGraphQLConnectionArgumentsWithWhere

Re-exports parseGraphQLConnectionArgumentsWithWhere


transformToDefaultGraphQLConnection

Re-exports transformToDefaultGraphQLConnection

Type Aliases

DefaultGraphQLArgumentError

Ƭ DefaultGraphQLArgumentError: Object

This is typescript type of a base graphQL argument error. This argument error type can be extended to create custom argument error types as long as they adhere to the default type of this base graphQL argument error.

Type declaration

NameType
messagestring
pathstring[]

Defined in

src/utilities/graphQLConnection/index.ts:24


DefaultGraphQLConnectionArguments

Ƭ DefaultGraphQLConnectionArguments: Object

This is typescript type of the standard arguments object received by a graphQL connection following the relay cursor connection specification, more info here:- https://relay.dev/graphql/connections.htm

Type declaration

NameType
after?string | null
before?string | null
first?number | null
last?number | null

Defined in

src/utilities/graphQLConnection/index.ts:33


GraphQLConnectionTraversalDirection

Ƭ GraphQLConnectionTraversalDirection: "FORWARD" | "BACKWARD"

This is typescript type of the direction the graphQL connection is to be traversed in.

Defined in

src/utilities/graphQLConnection/index.ts:43

Functions

isNotNullish

isNotNullish<T0>(value): value is T0

This function is used to check nullish state of a value passed to it. Nullish means the value being either null or undefined. If the value is found to be nullish, the function returns the boolean false, else it returns the boolean true.

Type parameters

Name
T0

Parameters

NameType
valueundefined | null | T0

Returns

value is T0

Example

Here's an example:-
function print(str: string | null) \{
if(isNotNullish(str)) \{
console.log(`the string is $\{str\}`)
\} else \{
console.log(`the string is null`)
\}
\}

Defined in

src/utilities/graphQLConnection/index.ts:15