Skip to main content

parseCursor

talawa-apiDocs


talawa-api / resolvers/User/posts / parseCursor

Function: parseCursor()

> parseCursor(args): ParseGraphQLConnectionCursorResult<string>

This function is used to validate and transform the cursor passed to the posts connection resolver.

Parameters

args: ParseGraphQLConnectionCursorArguments & object

An object that includes the cursor value, cursor name, cursor path, and the ID of the creator.

Returns

ParseGraphQLConnectionCursorResult<string>

A Promise that resolves to an object that includes a boolean indicating whether the operation was successful, and the parsed cursor value. If the operation was not successful, the object also includes an array of errors.

Throws

Error Throws an error if the provided cursor is invalid.

Defined in

src/resolvers/User/posts.ts:102