---
source: apollo-router/tests/type_conditions.rs
expression: response
---
{
  "data": {
    "search": [
      {
        "sections": [
          {
            "id": "d9077ad2-d79a-45b5-b5ee-25ded226f03c",
            "title": "d9077ad2-d79a-45b5-b5ee-25ded226f03c title",
            "artwork": "movieResultEnabled artwork"
          },
          {
            "id": "9f1f1ebb-21d3-4afe-bb7d-6de706f78f02",
            "title": "9f1f1ebb-21d3-4afe-bb7d-6de706f78f02 title",
            "artwork": "movieResultEnabled artwork"
          }
        ],
        "id": "c5f4985f-8fb6-4414-a3f5-56f7f58dd043"
      },
      {
        "sections": [
          {
            "id": "24cea0de-2ac8-4cbe-85b6-8b1b80647c12",
            "title": "24cea0de-2ac8-4cbe-85b6-8b1b80647c12 title",
            "artwork": "movieResultEnabled artwork"
          },
          {
            "artwork": "movieResultEnabled artwork",
            "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 { __typename ... on EntityCollectionSection { __typename id } ... on GallerySection { __typename id } } id } ... on ArticleResult { id sections { __typename ... on GallerySection { __typename id } ... on EntityCollectionSection { __typename id } } } } }",
              "operationName": "Search__searchSubgraph__0",
              "operationKind": "query",
              "id": null,
              "inputRewrites": null,
              "outputRewrites": null,
              "contextRewrites": null,
              "schemaAwareHash": "1138e2f3b4c65ff3ecc3bb1e38d5e8bb17923111e28b2cf0aff4e23c216d3854",
              "authorization": {
                "is_authenticated": false,
                "scopes": [],
                "policies": []
              }
            },
            {
              "kind": "Parallel",
              "nodes": [
                {
                  "kind": "Flatten",
                  "path": [
                    "search",
                    "@|[ArticleResult]",
                    "sections",
                    "@"
                  ],
                  "node": {
                    "kind": "Fetch",
                    "serviceName": "artworkSubgraph",
                    "requires": [
                      {
                        "kind": "InlineFragment",
                        "typeCondition": "GallerySection",
                        "selections": [
                          {
                            "kind": "Field",
                            "name": "__typename"
                          },
                          {
                            "kind": "Field",
                            "name": "id"
                          }
                        ]
                      },
                      {
                        "kind": "InlineFragment",
                        "typeCondition": "EntityCollectionSection",
                        "selections": [
                          {
                            "kind": "Field",
                            "name": "__typename"
                          },
                          {
                            "kind": "Field",
                            "name": "id"
                          }
                        ]
                      }
                    ],
                    "variableUsages": [
                      "articleResultParam"
                    ],
                    "operation": "query Search__artworkSubgraph__1($representations: [_Any!]!, $articleResultParam: String) { _entities(representations: $representations) { ... on GallerySection { artwork(params: $articleResultParam) } ... on EntityCollectionSection { artwork(params: $articleResultParam) title } } }",
                    "operationName": "Search__artworkSubgraph__1",
                    "operationKind": "query",
                    "id": null,
                    "inputRewrites": null,
                    "outputRewrites": null,
                    "contextRewrites": null,
                    "schemaAwareHash": "75bfbb6e482fd72ae0f8a154c8333a8a899928d5845dc27d622a124b9904fe89",
                    "authorization": {
                      "is_authenticated": false,
                      "scopes": [],
                      "policies": []
                    }
                  }
                },
                {
                  "kind": "Flatten",
                  "path": [
                    "search",
                    "@|[MovieResult]",
                    "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__2($representations: [_Any!]!, $movieResultParam: String) { _entities(representations: $representations) { ... on EntityCollectionSection { title artwork(params: $movieResultParam) } ... on GallerySection { artwork(params: $movieResultParam) } } }",
                    "operationName": "Search__artworkSubgraph__2",
                    "operationKind": "query",
                    "id": null,
                    "inputRewrites": null,
                    "outputRewrites": null,
                    "contextRewrites": null,
                    "schemaAwareHash": "d49281e1c4281485ae2f9ee8f82c313d79da4d8d54bc8a8a1ddd1a67c61a5f7b",
                    "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              __typename\n              ... on EntityCollectionSection {\n                __typename\n                id\n              }\n              ... on GallerySection {\n                __typename\n                id\n              }\n            }\n            id\n          }\n          ... on ArticleResult {\n            id\n            sections {\n              __typename\n              ... on GallerySection {\n                __typename\n                id\n              }\n              ... on EntityCollectionSection {\n                __typename\n                id\n              }\n            }\n          }\n        }\n      }\n    },\n    Parallel {\n      Flatten(path: \"search.@|[ArticleResult].sections.@\") {\n        Fetch(service: \"artworkSubgraph\") {\n          {\n            ... on GallerySection {\n              __typename\n              id\n            }\n            ... on EntityCollectionSection {\n              __typename\n              id\n            }\n          } =>\n          {\n            ... on GallerySection {\n              artwork(params: $articleResultParam)\n            }\n            ... on EntityCollectionSection {\n              artwork(params: $articleResultParam)\n              title\n            }\n          }\n        },\n      },\n      Flatten(path: \"search.@|[MovieResult].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  },\n}"
    }
  }
}
