---
source: apollo-router/tests/type_conditions.rs
expression: response
---
{
  "data": {
    "search": [
      {
        "id": "a7052397-b605-414a-aba4-408d51c8eef0",
        "sections": [
          {
            "artwork": "Hello World",
            "title": "d0182b8a-a671-4244-ba1c-905274b0d198 title"
          },
          {
            "artwork": "Hello World",
            "title": "e6eec2fc-05ce-40a2-956b-f1335e615204 title"
          }
        ]
      },
      {
        "id": "3a7b08c9-d8c0-4c55-b55d-596a272392e0",
        "sections": [
          {
            "artwork": "Hello World",
            "title": "f44f584e-5d3d-4466-96f5-9afc3f5d5a54 title"
          },
          {
            "artwork": "Hello World"
          }
        ]
      },
      {
        "sections": [
          {
            "id": "d9077ad2-d79a-45b5-b5ee-25ded226f03c",
            "title": "d9077ad2-d79a-45b5-b5ee-25ded226f03c title",
            "artwork": "Hello World"
          },
          {
            "id": "9f1f1ebb-21d3-4afe-bb7d-6de706f78f02",
            "title": "9f1f1ebb-21d3-4afe-bb7d-6de706f78f02 title",
            "artwork": "Hello World"
          }
        ],
        "id": "c5f4985f-8fb6-4414-a3f5-56f7f58dd043"
      },
      {
        "sections": [
          {
            "id": "24cea0de-2ac8-4cbe-85b6-8b1b80647c12",
            "title": "24cea0de-2ac8-4cbe-85b6-8b1b80647c12 title",
            "artwork": "Hello World"
          },
          {
            "artwork": "Hello World",
            "id": "2f772201-42ca-4376-9871-2252cc052262"
          }
        ],
        "id": "ff140d35-ce5d-48fe-bad7-1cfb2c3e310a"
      }
    ]
  },
  "extensions": {
    "apolloQueryPlan": {
      "object": {
        "kind": "QueryPlan",
        "node": {
          "kind": "Sequence",
          "nodes": [
            {
              "kind": "Fetch",
              "serviceName": "searchSubgraph",
              "variableUsages": [],
              "operation": "query Search__searchSubgraph__0 { search { __typename ... on MovieResult { sections { ...c } id } ... on ArticleResult { id sections { ...c } } } } fragment a on EntityCollectionSection { __typename id } fragment b on GallerySection { __typename id } fragment c on Section { __typename ...a ...b }",
              "operationName": "Search__searchSubgraph__0",
              "operationKind": "query",
              "id": null,
              "inputRewrites": null,
              "outputRewrites": null,
              "contextRewrites": null,
              "schemaAwareHash": "051a0faa33813724fa3bba65b83e23a2297611e368296fa571256f746fb21e31",
              "authorization": {
                "is_authenticated": false,
                "scopes": [],
                "policies": []
              }
            },
            {
              "kind": "Flatten",
              "path": [
                "search",
                "@",
                "sections",
                "@"
              ],
              "node": {
                "kind": "Fetch",
                "serviceName": "artworkSubgraph",
                "requires": [
                  {
                    "kind": "InlineFragment",
                    "typeCondition": "EntityCollectionSection",
                    "selections": [
                      {
                        "kind": "Field",
                        "name": "__typename"
                      },
                      {
                        "kind": "Field",
                        "name": "id"
                      }
                    ]
                  },
                  {
                    "kind": "InlineFragment",
                    "typeCondition": "GallerySection",
                    "selections": [
                      {
                        "kind": "Field",
                        "name": "__typename"
                      },
                      {
                        "kind": "Field",
                        "name": "id"
                      }
                    ]
                  }
                ],
                "variableUsages": [
                  "movieResultParam"
                ],
                "operation": "query Search__artworkSubgraph__1($representations: [_Any!]!, $movieResultParam: String) { _entities(representations: $representations) { ... on EntityCollectionSection { title artwork(params: $movieResultParam) } ... on GallerySection { artwork(params: $movieResultParam) } } }",
                "operationName": "Search__artworkSubgraph__1",
                "operationKind": "query",
                "id": null,
                "inputRewrites": null,
                "outputRewrites": null,
                "contextRewrites": null,
                "schemaAwareHash": "149c061870d11ccaa57bca965bf7ab4fbcfae01d5405032de5fed8b5564fe3dd",
                "authorization": {
                  "is_authenticated": false,
                  "scopes": [],
                  "policies": []
                }
              }
            }
          ]
        }
      },
      "text": "QueryPlan {\n  Sequence {\n    Fetch(service: \"searchSubgraph\") {\n      {\n        search {\n          __typename\n          ... on MovieResult {\n            sections {\n              ...c\n            }\n            id\n          }\n          ... on ArticleResult {\n            id\n            sections {\n              ...c\n            }\n          }\n        }\n      }\n\n      fragment a on EntityCollectionSection {\n        __typename\n        id\n      }\n\n      fragment b on GallerySection {\n        __typename\n        id\n      }\n\n      fragment c on Section {\n        __typename\n        ...a\n        ...b\n      }\n    },\n    Flatten(path: \"search.@.sections.@\") {\n      Fetch(service: \"artworkSubgraph\") {\n        {\n          ... on EntityCollectionSection {\n            __typename\n            id\n          }\n          ... on GallerySection {\n            __typename\n            id\n          }\n        } =>\n        {\n          ... on EntityCollectionSection {\n            title\n            artwork(params: $movieResultParam)\n          }\n          ... on GallerySection {\n            artwork(params: $movieResultParam)\n          }\n        }\n      },\n    },\n  },\n}"
    }
  }
}
