Limitations of Apollo Connectors

During the preview


Apollo Connectors is currently in public preview .To get started, you need an Apollo account with a GraphOS Trial or Enterprise plan .

Apollo Connectors has the following limitations while in preview.

Abstract schema types are unsupported

Abstract schema types (interface, union, and the @interfaceObject directive) are currently not supported with in subgraphs that contain connectors.

A workaround for union types is to create a new type that combines all the properties from each possible return type and mark any non-overlapping fields as nullable.

GraphQL
Unsupported
1type Query {
2  products: [Product]
3    @connect(
4      http: { GET: "/products" }
5      selection: """
6      $.results {
7        id
8        title
9        author { name }
10        director { name }
11      }
12      """
13    )
14}
15
16union Product = Book | Film
17
18type Book {
19  id: ID!
20  title: String
21  author: Person!
22}
23
24type Film {
25  id: ID!
26  title: String
27  director: Person!
28}
29
30type Person {
31  id: ID
32  name: String
33}
GraphQL
Workaround
1type Query {
2  products: [Product]
3    @connect(
4      http: { GET: "https://api.example.com/products" }
5      selection: """
6      $.results {
7        id
8        title
9        author { name }
10        director { name }
11      }
12      """
13    )
14}
15
16type Product {
17  id: ID!
18  title: String!
19  author: Person # nullable
20  director: Person # nullable
21}
22
23type Person {
24  id: ID
25  name: String
26}

Circular references are unsupported

Connectors don't yet support circular references in GraphQL schemas. See troubleshooting for details.

Subscriptions are unsupported

Currently, you can use @connect on fields of the Query and Mutation types, but not on fields of the Subscription type.

Changing enum value names is unsupported

If your enum values are not valid GraphQL identifiers, you'll need to treat the field as a String type for now.

JSON
1{
2  "status": "in progress"
3}
GraphQL
1type Query {
2  task: Task
3    @connect(http: { GET: "https://api.example.com/task" }, selection: "status")
4}
5
6type Task {
7  status: String # highlight-line
8}
9
10enum TaskStatus { # 😢
11  IN_PROGRESS
12  COMPLETED
13}

@context and @fromContext are unsupported

Support is on the roadmap.

@override is partially unsupported

It's not currently possible to override fields in a subgraph with connectors.

GraphQL
subgraph-a
1type Query {
2  products: [Product] @override(from: "subgraph-b") # ⛔️
3}
GraphQL
subgraph-b
1type Query {
2  products: [Product] @connect(...)
3}

The other direction is supported:

GraphQL
subgraph-a
1type Query {
2  products: [Product]
3}
GraphQL
subgraph-b
1type Query {
2  products: [Product]
3    @override(from: "subgraph-a") # ✅
4    @connect(...)
5}

Usage with schema proposals is unsupported

While you can use connectors directives in the schema proposals editor, schema checks run on proposal revisions with connectors currently fail. Support is on the roadmap.

Inconsistent query plan diagrams

The query plan diagrams for subgraphs with connectors are inconsistent across Apollo tools.

The GraphOS Router's sandbox shows an accurate query plan, but other presentations of a query plan diagram are incomplete. GraphOS Explorer and operation insights show only the subgraphs and without visibility into HTTP calls.

Interactions with GraphOS Router features

The following GraphOS Router features are not yet supported with connectors:

  • HTTP Traffic shaping

  • Demand control

  • Entity caching

  • Rhai scripting

  • Coprocessors

  • Native plugins