After running the sample query, I’m receiving the following error:
{
"data": {},
"errors": [
{
"message": "Cannot return null for non-nullable field Query.tracksForHome.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"tracksForHome"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"stacktrace": [
"Error: Cannot return null for non-nullable field Query.tracksForHome.",
" at completeValue (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\graphql\\execution\\execute.js:594:13)",
" at executeField (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\graphql\\execution\\execute.js:489:19)",
" at executeFields (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\graphql\\execution\\execute.js:413:20)",
" at executeOperation (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\graphql\\execution\\execute.js:344:14)",
" at execute (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\graphql\\execution\\execute.js:136:20)",
" at executeIncrementally (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\@apollo\\server\\dist\\cjs\\incrementalDeliveryPolyfill.js:47:34)",
" at processTicksAndRejections (node:internal/process/task_queues:96:5)",
" at async execute (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\@apollo\\server\\dist\\cjs\\requestPipeline.js:223:37)",
" at async processGraphQLRequest (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\@apollo\\server\\dist\\cjs\\requestPipeline.js:158:32)",
" at async internalExecuteOperation (C:\\Users\\SreelakshmiSuresh\\Desktop\\Training\\Backend Training\\GraphQL\\odyssey-lift-off-part2\\server\\node_modules\\@apollo\\server\\dist\\cjs\\ApolloServer.js:615:16)"
]
}
}
]
}Preformatted text
I checked all the files for typos but couldn’t find any. Any help would be appreciated. Thanks !