Using with GraphQl (resolver)
See original GitHub issueFirst of all many thanks for this great package 👍 Now I have a problem using this package with grapqhl (resolver). I always get the following output when a graphql error occurs:
{
"errors": [
{
"message": "Cannot read property 'raw' of undefined",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"ArticleListAll"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"stacktrace": [
"TypeError: Cannot read property 'raw' of undefined",
" at RenderFilter.<anonymous> (/home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/nest-next/dist/render.filter.js:36:33)",
" at Generator.next (<anonymous>)",
" at /home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/nest-next/dist/render.filter.js:16:71",
" at new Promise (<anonymous>)",
" at __awaiter (/home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/nest-next/dist/render.filter.js:12:12)",
" at RenderFilter.catch (/home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/nest-next/dist/render.filter.js:28:16)",
" at ExternalExceptionsHandler.invokeCustomFilters (/home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js:33:32)",
" at ExternalExceptionsHandler.next (/home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js:12:29)",
" at /home/rene/Projects/SmashoBase/nest/smasho-base/node_modules/@nestjs/core/helpers/external-proxy.js:12:42",
" at process._tickCallback (internal/process/next_tick.js:68:7)"
]
}
}
}
],
"data": {
"ArticleListAll": null
}
}
Also “setErrorHandler” is not triggered. A normal controller triggers it.
Thanks for your help
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Resolvers - Apollo GraphQL Docs
A resolver is a function that's responsible for populating the data for a single field in your schema. It can populate that data...
Read more >Execution - GraphQL
In fact, this is exactly how GraphQL works. Each field on each type is backed by a function called the resolver which is...
Read more >GraphQL - Resolver - Tutorialspoint
GraphQL - Resolver, Resolver is a collection of functions that generate response for a GraphQL query. In simple terms, a resolver acts as...
Read more >GraphQL Resolvers: Best Practices | by Mark Stuart - Medium
A resolver is a function that resolves a value for a type or field in a schema. Resolvers can return objects or scalars...
Read more >How To Build GraphQL Resolvers for AWS Data Sources
A GraphQL resolver is a function or method that resolves a value for a type or field within a schema. A resolver is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, you are correct! I pushed
v0.6.3
with this, sorry for prematurely closing the issue.Thank you for that example, it was extremely helpful. I just released
v0.6.1
with a fix for your bug. Let me know if you have any other issues!