アポロ連邦に移籍します。私は現在、スキーマをアポロスタジオにプッシュしている複数のサービスを持っています。そこにフェデレーテッド スキーマが表示されます。次のタイプがある場合、私は混乱しています。
type Purchase @key(fields: "id anotherRefrenceType oneMoreId") {
id: ID!
anotherRefrenceType: String
oneMoreId: String
extraField: String
}
今、私は別のタイプ*(別のサービス内)*を持っています
extend type Purchase @key(fields: "id anotherRefrenceType { id refCode}") {
id: ID! @external
anotherRefrenceType: String @external
}
フェデレーションを使用していない間、これは正常に機能していました。このスキーマがフェデレーションのために apollo-studio にプッシュされると、無効な @key ディレクティブのエラーが発生します。拡張タイプを次のように更新すると
extend type Purchase @key(fields: "id anotherRefrenceType oneMoreId") {
id: ID! @external
anotherRefrenceType: String @external
oneMoreId: String
}
graphql クエリが失敗します。これを更新する正しい方法は何ですか?