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
Now lets say I want to add a new optional argument to the Location.photo field. If I make this optional or specify a default this is not a breaking change for clients and would be accepted in a monograph as valid, however with composition this now fails
typeLocation@key(fields: "id") {
id: ID!photo(smallVersion: Boolean): String!@external # Need to update reference here and in every subgraph (blocking composition pipeline)banner: String@requires(fields: "photo")
}
What I would like to happen
Instead it would be nice if composition recognized when we are only referencing fields with optional arguments and not including them will not break any operations.
Caveat
There is a bit of a work around today which I am not sure is intentional or not, but you can actually add the reference first to the @external field only and this will not break composition, then you can go and add it to the source field.
The text was updated successfully, but these errors were encountered:
…xternal field has extra optional parameters, allow it to pass composition as being able to pass the parameter is not necessary for a required field.
Tentative fix for #2964.
Lets say I have this schema today which does compose ✅
Location.photo
that accepts zero arguments today@external
@requires
Subgraph 1
Subgraph 2
Now lets say I want to add a new optional argument to the
Location.photo
field. If I make this optional or specify a default this is not a breaking change for clients and would be accepted in a monograph as valid, however with composition this now failsSubgraph 1
Subgraph 2 ❌ (fails composition)
In order to fix this I need to go to every subgraph reference and update those as well
Subgraph 1
Subgraph 2 ✅ (passes composition)
What I would like to happen
Instead it would be nice if composition recognized when we are only referencing fields with optional arguments and not including them will not break any operations.
Caveat
There is a bit of a work around today which I am not sure is intentional or not, but you can actually add the reference first to the
@external
field only and this will not break composition, then you can go and add it to the source field.The text was updated successfully, but these errors were encountered: