Skip to content

Commit

Permalink
minor correction
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Oct 25, 2024
1 parent 8a5fb72 commit acee76f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/resolvers/UserTag/usersToAssignTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ This is typescript type of the parsed cursor for this connection resolver.
type ParsedCursor = string;

/**
* Parses the cursor value for the `To` connection resolver.
* Parses the cursor value for the `usersToAssignTo` connection resolver.
*
* This function is used to parse the cursor value provided to the `usersAssignedTo` connection resolver.
* This function is used to parse the cursor value provided to the `usersToAssignTo` connection resolver.
*
* @param cursorValue - The cursor value to be parsed.
* @param cursorName - The name of the cursor argument.
Expand All @@ -155,11 +155,11 @@ export const parseCursor = async ({
cursorPath,
}: ParseGraphQLConnectionCursorArguments): ParseGraphQLConnectionCursorResult<ParsedCursor> => {
const errors: DefaultGraphQLArgumentError[] = [];
const tagUser = await User.findOne({
const user = await User.findOne({
_id: cursorValue,
});

if (!tagUser) {
if (!user) {
errors.push({
message: `Argument ${cursorName} is an invalid cursor.`,
path: cursorPath,
Expand Down

0 comments on commit acee76f

Please sign in to comment.