---
source: apollo-router/tests/set_context.rs
expression: response
---
{
  "data": {
    "k": {
      "v": {
        "field": 3456
      }
    }
  },
  "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 QueryUnion__Subgraph1__0 { k { __typename ... on A { __typename prop v { __typename id } } ... on B { __typename prop v { __typename id } } } }",
              "operationKind": "query",
              "operationName": "QueryUnion__Subgraph1__0",
              "outputRewrites": null,
              "schemaAwareHash": "b07c8cbf00f54dd78ca49bcaba8d5accd924374454412a15634381c2ee618d0e",
              "serviceName": "Subgraph1",
              "variableUsages": []
            },
            {
              "kind": "Parallel",
              "nodes": [
                {
                  "kind": "Flatten",
                  "node": {
                    "authorization": {
                      "is_authenticated": false,
                      "policies": [],
                      "scopes": []
                    },
                    "contextRewrites": [
                      {
                        "kind": "KeyRenamer",
                        "path": [
                          "..",
                          "... on B",
                          "prop"
                        ],
                        "renameKeyTo": "contextualArgument_1_1"
                      }
                    ],
                    "id": null,
                    "inputRewrites": null,
                    "kind": "Fetch",
                    "operation": "query QueryUnion__Subgraph1__1($representations: [_Any!]!, $contextualArgument_1_1: String) { _entities(representations: $representations) { ... on V { field(a: $contextualArgument_1_1) } } }",
                    "operationKind": "query",
                    "operationName": "QueryUnion__Subgraph1__1",
                    "outputRewrites": null,
                    "requires": [
                      {
                        "kind": "InlineFragment",
                        "selections": [
                          {
                            "kind": "Field",
                            "name": "__typename"
                          },
                          {
                            "kind": "Field",
                            "name": "id"
                          }
                        ],
                        "typeCondition": "V"
                      }
                    ],
                    "schemaAwareHash": "60a2a9613aa90408d60cd268833751b54701ba35acae9adaa88171e5717f8384",
                    "serviceName": "Subgraph1",
                    "variableUsages": [
                      "contextualArgument_1_1"
                    ]
                  },
                  "path": [
                    "k|[B]",
                    "v"
                  ]
                },
                {
                  "kind": "Flatten",
                  "node": {
                    "authorization": {
                      "is_authenticated": false,
                      "policies": [],
                      "scopes": []
                    },
                    "contextRewrites": [
                      {
                        "kind": "KeyRenamer",
                        "path": [
                          "..",
                          "... on A",
                          "prop"
                        ],
                        "renameKeyTo": "contextualArgument_1_1"
                      }
                    ],
                    "id": null,
                    "inputRewrites": null,
                    "kind": "Fetch",
                    "operation": "query QueryUnion__Subgraph1__2($representations: [_Any!]!, $contextualArgument_1_1: String) { _entities(representations: $representations) { ... on V { field(a: $contextualArgument_1_1) } } }",
                    "operationKind": "query",
                    "operationName": "QueryUnion__Subgraph1__2",
                    "outputRewrites": null,
                    "requires": [
                      {
                        "kind": "InlineFragment",
                        "selections": [
                          {
                            "kind": "Field",
                            "name": "__typename"
                          },
                          {
                            "kind": "Field",
                            "name": "id"
                          }
                        ],
                        "typeCondition": "V"
                      }
                    ],
                    "schemaAwareHash": "cf6368974fec9812df4a7d63d36b6bd750e6af3df3542f5d7097a1c9a2c6e326",
                    "serviceName": "Subgraph1",
                    "variableUsages": [
                      "contextualArgument_1_1"
                    ]
                  },
                  "path": [
                    "k|[A]",
                    "v"
                  ]
                }
              ]
            }
          ]
        }
      },
      "text": "QueryPlan {\n  Sequence {\n    Fetch(service: \"Subgraph1\") {\n      {\n        k {\n          __typename\n          ... on A {\n            __typename\n            prop\n            v {\n              __typename\n              id\n            }\n          }\n          ... on B {\n            __typename\n            prop\n            v {\n              __typename\n              id\n            }\n          }\n        }\n      }\n    },\n    Parallel {\n      Flatten(path: \"k|[B].v\") {\n        Fetch(service: \"Subgraph1\") {\n          {\n            ... on V {\n              __typename\n              id\n            }\n          } =>\n          {\n            ... on V {\n              field(a: $contextualArgument_1_1)\n            }\n          }\n        },\n      },\n      Flatten(path: \"k|[A].v\") {\n        Fetch(service: \"Subgraph1\") {\n          {\n            ... on V {\n              __typename\n              id\n            }\n          } =>\n          {\n            ... on V {\n              field(a: $contextualArgument_1_1)\n            }\n          }\n        },\n      },\n    },\n  },\n}"
    }
  }
}
