parseCursor
talawa-api • Docs
talawa-api / resolvers/Query/advertisementsConnection / parseCursor
Function: parseCursor()
> parseCursor(__namedParameters
): ParseGraphQLConnectionCursorResult
<string
>
Validates and transforms the cursor passed to the connection resolver.
This function checks if the provided cursor value corresponds to a valid advertisement in the database. If the cursor is valid, it is returned as-is. Otherwise, an error is recorded.
Parameters
• __namedParameters: ParseGraphQLConnectionCursorArguments
Returns
ParseGraphQLConnectionCursorResult
<string
>
An object containing a flag indicating success or failure, the parsed cursor, and any errors encountered during validation.