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 want to be able to indicate to other subgraph authors that they should stop using a particular key to reference an entity and that there is another one everyone should use instead.
typeFoo@key(fields: "x y") @key(fields: "x", deprecated: "Use the new x+y key to reference this now") {
x: ID!y: ID!someField: String
}
This is not the same as marking the existing key field as deprecated, it is marking the use of the @key directive with those particular fields as deprecated
Some time in the future, I now want to migrate from using just Foo.x as the id to Foo.x AND Foo.y. However current subgraphs are still using only Foo.x as the reference. Well we can't break those subgraphs so we need to add the new key to one subgraph that understands that
We want some way in the tooling that you can indicate to all subgraphs that they need update their key references from @key(fields: "x") to @key(fields: "x y"). If all subgraphs do that then we can successfully remove @key(fields: "x") entirely and only use the new x + y id.
Today, that would have to be solved with communication, but I like the idea of adding a optional @key.deprecated flag so we could inform other subgraph authors with linter rules
Duplicate of apollographql/federation#2747
I want to be able to indicate to other subgraph authors that they should stop using a particular key to reference an entity and that there is another one everyone should use instead.
This is not the same as marking the existing key field as deprecated, it is marking the use of the
@key
directive with those particular fields as deprecatedSee the discussion in apollographql/federation#2695
Current I have two subgraphs and they use
Foo.x
to identify the keySome time in the future, I now want to migrate from using just
Foo.x
as the id toFoo.x
ANDFoo.y
. However current subgraphs are still using onlyFoo.x
as the reference. Well we can't break those subgraphs so we need to add the new key to one subgraph that understands thatThis is still valid
We want some way in the tooling that you can indicate to all subgraphs that they need update their key references from
@key(fields: "x")
to@key(fields: "x y")
. If all subgraphs do that then we can successfully remove@key(fields: "x")
entirely and only use the new x + y id.This is also still valid
Today, that would have to be solved with communication, but I like the idea of adding a optional
@key.deprecated
flag so we could inform other subgraph authors with linter rulesEventual state we want
The text was updated successfully, but these errors were encountered: