I am implementing a query that gets user credentials form the db, uses these to fetch data and return the data to the client side. But i get this error:
[ Wasp ] server/operations/queries/index.ts(63,14): error TS2322: Type '(args: unknown, context: { user: AuthUser; }) => Promise<Payload>' is not assignable to type '(args: any, context: { user: AuthUser; }) => Promise<void | { [date: string]: OrderData; }>'. [ Wasp ] Type 'Promise<Payload>' is not assignable to type 'Promise<void | { [date: string]: OrderData; }>'. [ Wasp ] Type 'Payload' is not assignable to type 'void | { [date: string]: OrderData; }'. [ Wasp ] Type 'string' is not assignable to type 'void | { [date: string]: OrderData; }'. [ Wasp ] server/operations/queries/index.ts(63,62): error TS2344: Type '(args: any, context: any) => Promise<{ [date: string]: OrderData; } | void>' does not satisfy the constraint 'GenericAuthenticatedOperationDefinition'. [ Wasp ] Type 'Promise<void | { [date: string]: OrderData; }>' is not assignable to type 'Payload | Promise<Payload>'. [ Wasp ] Type 'Promise<void | { [date: string]: OrderData; }>' is not assignable to type 'Symbol | Set<SuperJSONValue> | Map<SuperJSONValue, SuperJSONValue> | Promise<Payload>'. [ Wasp ] Type 'Promise<void | { [date: string]: OrderData; }>' is not assignable to type 'Promise<Payload>'. [ Wasp ] Type 'void | { [date: string]: OrderData; }' is not assignable to type 'Payload'. [ Wasp ] Type '{ [date: string]: OrderData; }' is not assignable to type 'Payload'. [ Wasp ] Type '{ [date: string]: OrderData; }' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. [ Wasp ] server/operations/queries/index.ts(65,5): error TS2345: Argument of type '(args: any, context: any) => Promise<{ [date: string]: OrderData; } | void>' is not assignable to parameter of type 'GenericAuthenticatedO
Similar Threads
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.