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
Today if I need to reference a type because I am using something like @requires, I need to mark the type and field as @external. However if this type also has more fields which I don't reference in my @requires and I do not include them in my separate definition, I get the Federation hint INCONSISTENT_OBJECT_VALUE_TYPE_FIELD.
HINT: [INCONSISTENT_OBJECT_VALUE_TYPE_FIELD]: Field "Foo.b" of non-entity object type "Foo" is defined in some but not all subgraphs that define "Foo": "Foo.b" is defined in subgraph "locations" but not in subgraph "reviews".
HINT: [INCONSISTENT_OBJECT_VALUE_TYPE_FIELD]: Field "Foo.c" of non-entity object type "Foo" is defined in some but not all subgraphs that define "Foo": "Foo.c" is defined in subgraph "locations" but not in subgraph "reviews".
What you need to do to fix this issue is to update your definition of subgraph 2 to this
In subgraph two (reviews), it would be nice to not have to redefine the entire Foo type when I am only using it for @external references and I only need to reference Foo.a.
If I now update the Foo type to include a new field Foo.d, I have to go to many locations to do that when it is not even used there or even worse what if the type has 100 different fields or I reference many other types that need external links then my schema get's quite large when I am just trying to define one resolver for Location.overallRating
Ways we could solve
There are many different way but to list some ideas...
Allow the reference to a "partial" type if everything is marked as @external
Allow importing a reference aka linking so there is not any definition to Foo at all in my subgraph
The text was updated successfully, but these errors were encountered:
Today if I need to reference a type because I am using something like
@requires
, I need to mark the type and field as@external
. However if this type also has more fields which I don't reference in my@requires
and I do not include them in my separate definition, I get the Federation hintINCONSISTENT_OBJECT_VALUE_TYPE_FIELD
.For example
Subgraph One
Subgraph Two
This composes without errors but I do get a HINT
What you need to do to fix this issue is to update your definition of subgraph 2 to this
What I would like
In subgraph two (reviews), it would be nice to not have to redefine the entire
Foo
type when I am only using it for@external
references and I only need to referenceFoo.a
.If I now update the
Foo
type to include a new fieldFoo.d
, I have to go to many locations to do that when it is not even used there or even worse what if the type has 100 different fields or I reference many other types that need external links then my schema get's quite large when I am just trying to define one resolver forLocation.overallRating
Ways we could solve
There are many different way but to list some ideas...
@external
The text was updated successfully, but these errors were encountered: