---
source: apollo-router/tests/set_context.rs
expression: response
snapshot_kind: text
---
{
  "data": null,
  "errors": [
    {
      "message": "Some error",
      "path": [
        "t",
        "u"
      ],
      "extensions": {
        "service": "Subgraph2"
      }
    }
  ],
  "extensions": {
    "apolloQueryPlan": {
      "object": {
        "kind": "QueryPlan",
        "node": {
          "kind": "Sequence",
          "nodes": [
            {
              "authorization": {
                "is_authenticated": false,
                "policies": [],
                "scopes": []
              },
              "contextRewrites": null,
              "id": null,
              "inputRewrites": null,
              "kind": "Fetch",
              "operation": "query Query_fetch_failure__Subgraph1__0{t{__typename prop id u{__typename id}}}",
              "operationKind": "query",
              "operationName": "Query_fetch_failure__Subgraph1__0",
              "outputRewrites": null,
              "schemaAwareHash": "d6133b40599aaa7350d8c321d5313a7823d3430caab4c250754d24bb88ad0bce",
              "serviceName": "Subgraph1",
              "variableUsages": []
            },
            {
              "kind": "Parallel",
              "nodes": [
                {
                  "kind": "Flatten",
                  "node": {
                    "authorization": {
                      "is_authenticated": false,
                      "policies": [],
                      "scopes": []
                    },
                    "contextRewrites": null,
                    "id": null,
                    "inputRewrites": null,
                    "kind": "Fetch",
                    "operation": "query Query_fetch_failure__Subgraph2__1($representations:[_Any!]!){_entities(representations:$representations){...on U{b}}}",
                    "operationKind": "query",
                    "operationName": "Query_fetch_failure__Subgraph2__1",
                    "outputRewrites": null,
                    "requires": [
                      {
                        "kind": "InlineFragment",
                        "selections": [
                          {
                            "kind": "Field",
                            "name": "__typename"
                          },
                          {
                            "kind": "Field",
                            "name": "id"
                          }
                        ],
                        "typeCondition": "U"
                      }
                    ],
                    "schemaAwareHash": "690a46547feb85f93bad65bf9c7015add2403adb114442971001b437549e45db",
                    "serviceName": "Subgraph2",
                    "variableUsages": []
                  },
                  "path": [
                    "",
                    "t",
                    "u"
                  ]
                },
                {
                  "kind": "Flatten",
                  "node": {
                    "authorization": {
                      "is_authenticated": false,
                      "policies": [],
                      "scopes": []
                    },
                    "contextRewrites": [
                      {
                        "kind": "KeyRenamer",
                        "path": [
                          "..",
                          "... on T",
                          "prop"
                        ],
                        "renameKeyTo": "contextualArgument_1_0"
                      }
                    ],
                    "id": null,
                    "inputRewrites": null,
                    "kind": "Fetch",
                    "operation": "query Query_fetch_failure__Subgraph1__2($representations:[_Any!]!$contextualArgument_1_0:String){_entities(representations:$representations){...on U{field(a:$contextualArgument_1_0)}}}",
                    "operationKind": "query",
                    "operationName": "Query_fetch_failure__Subgraph1__2",
                    "outputRewrites": null,
                    "requires": [
                      {
                        "kind": "InlineFragment",
                        "selections": [
                          {
                            "kind": "Field",
                            "name": "__typename"
                          },
                          {
                            "kind": "Field",
                            "name": "id"
                          }
                        ],
                        "typeCondition": "U"
                      }
                    ],
                    "schemaAwareHash": "5281c0f7b42b131f5e9a629d3340eac6026e5042580283b0f3d1b5892b351a22",
                    "serviceName": "Subgraph1",
                    "variableUsages": [
                      "contextualArgument_1_0"
                    ]
                  },
                  "path": [
                    "",
                    "t",
                    "u"
                  ]
                }
              ]
            }
          ]
        }
      },
      "text": "QueryPlan {\n  Sequence {\n    Fetch(service: \"Subgraph1\") {\n      {\n        t {\n          __typename\n          prop\n          id\n          u {\n            __typename\n            id\n          }\n        }\n      }\n    },\n    Parallel {\n      Flatten(path: \".t.u\") {\n        Fetch(service: \"Subgraph2\") {\n          {\n            ... on U {\n              __typename\n              id\n            }\n          } =>\n          {\n            ... on U {\n              b\n            }\n          }\n        },\n      },\n      Flatten(path: \".t.u\") {\n        Fetch(service: \"Subgraph1\") {\n          {\n            ... on U {\n              __typename\n              id\n            }\n          } =>\n          {\n            ... on U {\n              field(a: $contextualArgument_1_0)\n            }\n          }\n        },\n      },\n    },\n  },\n}"
    },
    "valueCompletion": [
      {
        "message": "Cannot return null for non-nullable field U.field",
        "path": [
          "t",
          "u"
        ]
      },
      {
        "message": "Cannot return null for non-nullable field T.u",
        "path": [
          "t",
          "u"
        ]
      },
      {
        "message": "Cannot return null for non-nullable field T!.t",
        "path": [
          "t"
        ]
      }
    ]
  }
}
