You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
When using createEncapsulateTransform and a type that implements an interface, the type is not included in the supergraph schema at all. Queries on __typename return the interface and it is not possible to query ... on <type>. After removing the createEncapsulateTransform the mesh behaves as expected.
query Test{
api {
hello {
message
__typename
... on HelloGreeting {
iconName
}
}
}
}
is an invalid query.
Environment:
OS: OSX
@graphql-mesh/compose-cli: 1.3.10
@graphql-hive/gateway: 1.9.4
NodeJS: 22
Additional context
This works fine when removing the createEncapsulateTransform and adjusting the queries.
I'm trying to separate all my subgraphs under it's their own nodes to avoid schema clashes and can't think of any way to do this without the encapsulation transform.
The text was updated successfully, but these errors were encountered:
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Github,
Stackblitz
or
CodeSandbox
Describe the bug
When using
createEncapsulateTransform
and atype
that implements aninterface
, the type is not included in the supergraph schema at all. Queries on__typename
return the interface and it is not possible to query... on <type>
. After removing thecreateEncapsulateTransform
the mesh behaves as expected.To Reproduce Steps to reproduce the behavior:
See: https://github.com/fauna5/hive-gateway-playground/tree/encapsulate_issues?tab=readme-ov-file#graphql-mesh-bug-recreation-missing-types-when-using-createencapsulatetransform for an example recreation. The subgraph schema is:
Expected behavior
After running
mesh-compose
andhive-gateway
querying forshould return
however it returns
...and querying for:
is an invalid query.
Environment:
Additional context
This works fine when removing the
createEncapsulateTransform
and adjusting the queries.I'm trying to separate all my subgraphs under it's their own nodes to avoid schema clashes and can't think of any way to do this without the encapsulation transform.
The text was updated successfully, but these errors were encountered: