Hi Apollo team,
I am creating Javascript apollo graphql project and want to modify response object in such manner that -
Suppose below is my query -
query ProductInfo {
productInfo {
id
}
hello
}
so on running these query, suppose if productinfo fails and hello query works then deafult way is like this -
{
"data": {
"productInfo": null,
"hello": "Hello welcome to new app buddy"
},
"errors": [
{
"message": "Something has gone wrong",
................
.........
}
But I want like errors should be part of query rather than separate objects -
for example -
{
"data": {
"productInfo": {
"errors": [
{
"message": "Something has gone wrong",
................
.........
}]
},
then second query details -
"hello": "Hello welcome to new app buddy"
},
Can we modify please help