-
Notifications
You must be signed in to change notification settings - Fork 351
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
- 1. The issue provides a reproduction available on
Github,
Stackblitz
or
CodeSandbox
Make sure to fork this template and run
yarn generate
in the terminal.Please make sure Mesh package versions under
package.json
matches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
I am trying to build subgraphs for my gRPC services using gRPC introspection. However, I am building the subgraphs individually, not as part of a supergraph. When I try to use additionalTypeDefs
to extend a type from one subgraph with a type from another subgraph, the new field does not appear in the built subgraph. This only works correctly when building the full supergraph.
To Reproduce Steps to reproduce the behavior:
- Define two gRPC services (
ServiceA
andServiceB
). - In the mesh configuration, use
additionalTypeDefs
to extend a type fromServiceA
to include a type fromServiceB
using a Query fromServiceB
. - Build the subgraph for
ServiceA
. - Observe that the new field does not appear in the
ServiceA
subgraph.
Expected behavior
The extended type in ServiceA
should include the field from ServiceB
when building the subgraph individually.
Environment:
- OS: macOS Sequoia 15.6
@graphql-mesh/...
: ^1.4.11- NodeJS: 23.6.0
Additional context
In my MeshComposeCLIConfig
I am providing all the subgraphs at once, as well as the additionalTypeDefs
:
additionalTypeDefs: `
extend type V1ServiceAType {
serviceBType: V1ServiceBType!
@resolveTo(
sourceName: "serviceB",
sourceTypeName: "Query",
sourceFieldName: "V1ServiceBListServicesBByIds",
keysArg: "input.id",
keyField: "serviceBId",
)
}
`