Skip to content

Unable to extend types in subgraphs with Federation + Hive Cloud (gRPC-based services) #1427

@adrian-milea

Description

@adrian-milea

We are using Hive Cloud with federation and gRPC-based services. Since all of our services are gRPC, we don’t have direct control over the GraphQL schemas. Instead, we generate subgraph schemas dynamically at deploy time using gRPC reflection, and then publish these subgraphs to Hive. The Hive Gateway uses the Hive CDN to serve the final supergraph.

We are trying to extend a type so that the new field is available in the final supergraph (and visible in Hive Playground/Laboratory). However, adding an extend type definition in the Base Schema in Hive Cloud has no effect; the new field does not appear in the supergraph.

Schema Snippet (from Base Schema in Hive Cloud):

extend type V1UserOrganizationTuple {
  user: V1User!
    @resolveTo(
      sourceName: "user",
      sourceTypeName: "Query",
      sourceFieldName: "V1UserServiceListUsersByIds",
      keysArg: "input.id",
      keyField: "userId",
    )
}

How can we properly extend types in subgraphs when using Hive Cloud + Federation, so that new fields from extend type definitions become available in the final supergraph?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions