Skip to content

Commit

Permalink
Update allUsers.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulch07 authored Feb 23, 2025
1 parent 93450fd commit 097d8c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graphql/types/Query/allUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
// Extend the default connection arguments to include name search
const allUsersArgumentsSchema = defaultGraphQLConnectionArgumentsSchema
.extend({
name: z.string().min(1).optional(),
name: z.string().min(1).optional().nullish(),
})
.transform(transformDefaultGraphQLConnectionArguments)
.transform((arg, ctx) => {
Expand Down Expand Up @@ -68,6 +68,7 @@ builder.queryField("allUsers", (t) =>
args: {
name: t.arg.string({ required: false }),
},
description: "Query field to read all Users.",
resolve: async (_parent, args, ctx) => {
if (!ctx.currentClient.isAuthenticated) {
throw new TalawaGraphQLError({
Expand Down

0 comments on commit 097d8c7

Please sign in to comment.