You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've setup the the typegraphql library with Apollo graphql server with express plugin, the problem is that whenever I want to pass an custom class object into the arguments of the query/mutation the Apollo server gives an error saying.
Unexpected error processing request: TypeError: Cannot read properties of undefined (reading 'code') TypeError: Cannot read properties of undefined (reading 'code') at enrichError (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/errorNormalize.js:34:43) at /Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/errorNormalize.js:19:28 at Array.map (<anonymous>) at normalizeAndFormatErrors (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/errorNormalize.js:13:33) at ApolloServer.errorResponse (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/ApolloServer.js:560:102) at ApolloServer.executeHTTPGraphQLRequest (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/ApolloServer.js:556:25) at processTicksAndRejections (node:internal/process/task_queues:96:5)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've setup the the typegraphql library with Apollo graphql server with express plugin, the problem is that whenever I want to pass an custom class object into the arguments of the query/mutation the Apollo server gives an error saying.
Unexpected error processing request: TypeError: Cannot read properties of undefined (reading 'code') TypeError: Cannot read properties of undefined (reading 'code') at enrichError (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/errorNormalize.js:34:43) at /Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/errorNormalize.js:19:28 at Array.map (<anonymous>) at normalizeAndFormatErrors (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/errorNormalize.js:13:33) at ApolloServer.errorResponse (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/ApolloServer.js:560:102) at ApolloServer.executeHTTPGraphQLRequest (/Users/vanshulbhatia/Desktop/projects/fullstack/server/node_modules/@apollo/server/dist/cjs/ApolloServer.js:556:25) at processTicksAndRejections (node:internal/process/task_queues:96:5)
Here is my UserResolver
My main server file is this
I've tried with multiple decorators (hit and try) but nothing worked?
What is the cause and what is the significance of "code" in the error
Beta Was this translation helpful? Give feedback.
All reactions