© 2026 Hedgehog Software, LLC
const getAllGoalsByClientSchema = z.object({ selectedClientId: z.string().uuid(), }) type GetAllGoalsByClientInput = z.infer<typeof getAllGoalsByClientSchema> export const getAllGoalsByClient: GetAllGoalsByClient<GetAllGoalsByClientInput, Goal[]> = async (rawArgs, context) => { if (!context.user) { throw new HttpError(401, 'Only authenticated users are allowed to perform this operation') } const { selectedClientId } = ensureArgsSchemaOrThrowHttpError(getAllGoalsByClientSchema, rawArgs) return context.entities.Goal.findMany({ where: { clientId: selectedClientId }, }) }
const { data: goals } = useQuery(getAllGoalsByClient, { selectedClientId })
Argument of type '(args: { selectedClientId: string; }, context: { user: AuthUser; }) => Promise<{ id: string; title: string; description: string | null; createdAt: Date; updatedAt: Date; clientId: string; }[]>' is not assignable to parameter of type 'Query<{ selectedClientId: string; }, { id: string; title: string; description: string | null; createdAt: Date; updatedAt: Date; clientId: string; }[]>'. Type '(args: { selectedClientId: string; }, context: { user: AuthUser; }) => Promise<{ id: string; title: string; description: string | null; createdAt: Date; updatedAt: Date; clientId: string; }[]>' is not assignable to type '(args: { selectedClientId: string; }) => Promise<{ id: string; title: string; description: string | null; createdAt: Date; updatedAt: Date; clientId: string; }[]>'. Target signature provides too few arguments. Expected 2 or more, but got 1. [2345]
Join the Discord to ask follow-up questions and connect with the community
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.
4,603 Members