Hi @Michelle_Mabuyo I just cloned project voyage odyssey 1 series, code from below mentioned git url -
Please refere below snapshot - I am using locations subgraph and passing below query and null as localtionId
query Locations($locationId: ID!) {
location(id: $locationId) {
id
name
}
}
But, there is a issue with error section in repsosne -
I am getting two error object for similar type of error , refer below blockquote for complete error object-
For each type of error, error object contains duplicate object for same
Blockquote
{
“data”: {},
“errors”: [
{
“message”: “Variable "$locationId" of non-null type "ID!" must not be null.”,
“locations”: [
{
“line”: 1,
“column”: 17
}
],
“extensions”: {
“code”: “BAD_USER_INPUT”,
“stacktrace”: [
“GraphQLError: Variable "$locationId" of non-null type "ID!" must not be null.”,
" at coerceVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\values.js:122:9)“,
" at getVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\values.js:45:21)”,
" at buildExecutionContext (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\execute.js:280:63)“,
" at execute (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\execute.js:116:22)”,
" at executeIncrementally (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\incrementalDeliveryPolyfill.js:47:34)“,
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at async execute (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\requestPipeline.js:223:37)“,
" at async processGraphQLRequest (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\requestPipeline.js:158:32)”,
" at async internalExecuteOperation (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\ApolloServer.js:603:16)“,
" at async runHttpQuery (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\runHttpQuery.js:121:29)”
]
}
},
{
“message”: “Variable "$locationId" of non-null type "ID!" must not be null.”,
“locations”: [
{
“line”: 1,
“column”: 17
}
],
“extensions”: {
“code”: “BAD_USER_INPUT”,
“stacktrace”: [
“GraphQLError: Variable "$locationId" of non-null type "ID!" must not be null.”,
" at coerceVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\values.js:122:9)“,
" at getVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\values.js:45:21)”,
" at buildExecutionContext (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\execute.js:280:63)“,
" at execute (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\graphql\execution\execute.js:116:22)”,
" at executeIncrementally (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\incrementalDeliveryPolyfill.js:47:34)“,
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at async execute (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\requestPipeline.js:223:37)“,
" at async processGraphQLRequest (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\requestPipeline.js:158:32)”,
" at async internalExecuteOperation (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\ApolloServer.js:603:16)“,
" at async runHttpQuery (C:\Users\ankitsingh57\Documents\Humana\apollo_voyage_poroject\odyssey-voyage-I\subgraph-locations\node_modules\@apollo\server\dist\cjs\runHttpQuery.js:121:29)”
]
}
}
]
}