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
I'm trying to compose a supergraph where one of the subgraph is referencing an interface from the other subgraph with the @interfaceObject directive. It is not adding any fields, it just needs to define the type to be able to use it in queries. However, the subgraph also extends one of the implementing types with a field and hence I get the INTERFACE_OBJECT_USAGE_ERROR with the error message Interface type "Media" is defined as an @interfaceObject in subgraph "b" so that subgraph should not define any of the implementation types of "Media", but it defines type "Movie"
The documentation says that
"If a subgraph contributes entity fields via @interfaceObject, it "gives up" the ability to contribute fields to any individual entity that implements that interface."
But in this case I'm not contributing any fields to the interface via @interfaceObject so I would argue that the compose validation is a bit too restrictive in this case.
The following schemas can be used for reproduction
Issue Description
I'm trying to compose a supergraph where one of the subgraph is referencing an interface from the other subgraph with the @interfaceObject directive. It is not adding any fields, it just needs to define the type to be able to use it in queries. However, the subgraph also extends one of the implementing types with a field and hence I get the INTERFACE_OBJECT_USAGE_ERROR with the error message
Interface type "Media" is defined as an @interfaceObject in subgraph "b" so that subgraph should not define any of the implementation types of "Media", but it defines type "Movie"
The documentation says that
"If a subgraph contributes entity fields via @interfaceObject, it "gives up" the ability to contribute fields to any individual entity that implements that interface."
But in this case I'm not contributing any fields to the interface via @interfaceObject so I would argue that the compose validation is a bit too restrictive in this case.
The following schemas can be used for reproduction
Link to Reproduction
https://codesandbox.io/p/devbox/amazing-dirac-mrm9sj
Reproduction Steps
Go to the sandbox and check the terminal output or try to compose the schemas above into a supergraph with rover.
The text was updated successfully, but these errors were encountered: