apollo-federation 2.15.0

Apollo Federation
Documentation
---
source: apollo-federation/src/connectors/expand/tests/mod.rs
assertion_line: 26
expression: connectors.by_service_name
input_file: apollo-federation/src/connectors/expand/tests/schemas/expand/nested_inputs.graphql
---
{
    "connectors_Query_foo_0": Connector {
        id: ConnectId {
            subgraph_name: "connectors",
            source_name: Some(
                "example",
            ),
            named: None,
            directive: Field(
                ObjectOrInterfaceFieldDirectivePosition {
                    field: Object(Query.foo),
                    directive_name: "connect",
                    directive_index: 0,
                },
            ),
        },
        transport: Some(
            HttpJsonTransport {
                source_template: Some(
                    StringTemplate {
                        parts: [
                            Constant(
                                Constant {
                                    value: "http://example",
                                    location: 0..14,
                                },
                            ),
                        ],
                    },
                ),
                connect_template: StringTemplate {
                    parts: [
                        Constant(
                            Constant {
                                value: "/",
                                location: 0..1,
                            },
                        ),
                        Expression(
                            Expression {
                                expression: JSONSelection {
                                    inner: Value(
                                        WithRange {
                                            node: Path(
                                                PathSelection {
                                                    path: WithRange {
                                                        node: Var(
                                                            WithRange {
                                                                node: $args,
                                                                range: Some(
                                                                    0..5,
                                                                ),
                                                            },
                                                            WithRange {
                                                                node: Key(
                                                                    WithRange {
                                                                        node: Field(
                                                                            "bar",
                                                                        ),
                                                                        range: Some(
                                                                            6..9,
                                                                        ),
                                                                    },
                                                                    WithRange {
                                                                        node: Empty,
                                                                        range: Some(
                                                                            9..9,
                                                                        ),
                                                                    },
                                                                ),
                                                                range: Some(
                                                                    5..9,
                                                                ),
                                                            },
                                                        ),
                                                        range: Some(
                                                            0..9,
                                                        ),
                                                    },
                                                },
                                            ),
                                            range: Some(
                                                0..9,
                                            ),
                                        },
                                    ),
                                    spec: V0_1,
                                },
                                location: 2..11,
                            },
                        ),
                        Constant(
                            Constant {
                                value: "/",
                                location: 12..13,
                            },
                        ),
                        Expression(
                            Expression {
                                expression: JSONSelection {
                                    inner: Value(
                                        WithRange {
                                            node: Path(
                                                PathSelection {
                                                    path: WithRange {
                                                        node: Var(
                                                            WithRange {
                                                                node: $args,
                                                                range: Some(
                                                                    0..5,
                                                                ),
                                                            },
                                                            WithRange {
                                                                node: Key(
                                                                    WithRange {
                                                                        node: Field(
                                                                            "doubleBaz",
                                                                        ),
                                                                        range: Some(
                                                                            6..15,
                                                                        ),
                                                                    },
                                                                    WithRange {
                                                                        node: Key(
                                                                            WithRange {
                                                                                node: Field(
                                                                                    "buzz",
                                                                                ),
                                                                                range: Some(
                                                                                    16..20,
                                                                                ),
                                                                            },
                                                                            WithRange {
                                                                                node: Empty,
                                                                                range: Some(
                                                                                    20..20,
                                                                                ),
                                                                            },
                                                                        ),
                                                                        range: Some(
                                                                            15..20,
                                                                        ),
                                                                    },
                                                                ),
                                                                range: Some(
                                                                    5..20,
                                                                ),
                                                            },
                                                        ),
                                                        range: Some(
                                                            0..20,
                                                        ),
                                                    },
                                                },
                                            ),
                                            range: Some(
                                                0..20,
                                            ),
                                        },
                                    ),
                                    spec: V0_1,
                                },
                                location: 14..34,
                            },
                        ),
                        Constant(
                            Constant {
                                value: "/",
                                location: 35..36,
                            },
                        ),
                        Expression(
                            Expression {
                                expression: JSONSelection {
                                    inner: Value(
                                        WithRange {
                                            node: Path(
                                                PathSelection {
                                                    path: WithRange {
                                                        node: Var(
                                                            WithRange {
                                                                node: $args,
                                                                range: Some(
                                                                    0..5,
                                                                ),
                                                            },
                                                            WithRange {
                                                                node: Key(
                                                                    WithRange {
                                                                        node: Field(
                                                                            "baz",
                                                                        ),
                                                                        range: Some(
                                                                            6..9,
                                                                        ),
                                                                    },
                                                                    WithRange {
                                                                        node: Key(
                                                                            WithRange {
                                                                                node: Field(
                                                                                    "quux",
                                                                                ),
                                                                                range: Some(
                                                                                    10..14,
                                                                                ),
                                                                            },
                                                                            WithRange {
                                                                                node: Key(
                                                                                    WithRange {
                                                                                        node: Field(
                                                                                            "quaz",
                                                                                        ),
                                                                                        range: Some(
                                                                                            15..19,
                                                                                        ),
                                                                                    },
                                                                                    WithRange {
                                                                                        node: Empty,
                                                                                        range: Some(
                                                                                            19..19,
                                                                                        ),
                                                                                    },
                                                                                ),
                                                                                range: Some(
                                                                                    14..19,
                                                                                ),
                                                                            },
                                                                        ),
                                                                        range: Some(
                                                                            9..19,
                                                                        ),
                                                                    },
                                                                ),
                                                                range: Some(
                                                                    5..19,
                                                                ),
                                                            },
                                                        ),
                                                        range: Some(
                                                            0..19,
                                                        ),
                                                    },
                                                },
                                            ),
                                            range: Some(
                                                0..19,
                                            ),
                                        },
                                    ),
                                    spec: V0_1,
                                },
                                location: 37..56,
                            },
                        ),
                    ],
                },
                method: Get,
                headers: [],
                body: None,
                source_path: None,
                source_query_params: None,
                connect_path: None,
                connect_query_params: None,
            },
        ),
        selection: JSONSelection {
            inner: Value(
                WithRange {
                    node: Path(
                        PathSelection {
                            path: WithRange {
                                node: Var(
                                    WithRange {
                                        node: $,
                                        range: Some(
                                            0..1,
                                        ),
                                    },
                                    WithRange {
                                        node: Empty,
                                        range: Some(
                                            1..1,
                                        ),
                                    },
                                ),
                                range: Some(
                                    0..1,
                                ),
                            },
                        },
                    ),
                    range: Some(
                        0..1,
                    ),
                },
            ),
            spec: V0_1,
        },
        config: None,
        max_requests: None,
        entity_resolver: None,
        spec: V0_1,
        schema_subtypes_map: {},
        request_headers: {},
        response_headers: {},
        request_variable_keys: {
            $args: {
                "bar",
                "doubleBaz",
                "baz",
            },
        },
        response_variable_keys: {},
        batch_settings: None,
        error_settings: ConnectorErrorsSettings {
            message: None,
            source_extensions: None,
            connect_extensions: None,
            connect_is_success: None,
        },
        label: Label(
            "connectors.example http: GET /{$args.bar}/{$args.doubleBaz.buzz}/{$args.baz.quux.quaz}",
        ),
    },
}