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
For both I'm seeing errors about results not returning a non-null field for <TypeName>Page.results. I'm not sure if maybe there's something I need to do in the resolvers or not to make this work but returning { results: <some data> }
{
"errors": [
{
"message": "Cannot return null for non-nullable field PostPage.results.",
"locations": [
{
"line": 3,
"column": 5
}
],
"path": [
"posts",
"results"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"stacktrace": [
"Error: Cannot return null for non-nullable field PostPage.results.",
" at completeValue (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:560:13)",
" at completeValueCatchingError (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:495:19)",
" at resolveField (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:435:10)",
" at executeFields (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:275:18)",
" at collectAndExecuteSubfields (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:713:10)",
" at completeObjectValue (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:703:10)",
" at completeValue (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:591:12)",
" at completeValue (/Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:557:21)",
" at /Users/tristan/code/thedipp/api.thedipp.com/node_modules/graphql/execution/execute.js:492:16",
" at processTicksAndRejections (internal/process/task_queues.js:97:5)"
]
}
}
}
],
"data": null
}
The text was updated successfully, but these errors were encountered:
Apologies it's not clearer in the docs :( To be honest, the current way of adding pagination is still overly complicated. It's yet another thing I hope we can fix by moving away from a schema-first approach.
I've added
@paginate
and it breaks on many to many relationships, and I'm not sure if I'm using it incorrectly for other custom resolvers.For both I'm seeing errors about
results
not returning a non-null field for<TypeName>Page.results
. I'm not sure if maybe there's something I need to do in the resolvers or not to make this work but returning{ results: <some data> }
The text was updated successfully, but these errors were encountered: