Saharath Kleips
04/26/2022, 8:30 PMBox
◦ id
◦ size
◦ …
◦ shape ids
• Shape
◦ id
◦ type
◦ …
Box
and Shape
are served by two independent services. Can we (or does it make sense to) have Shape
“extend” Box
to “fully resolve” shapes for a given box?Dariusz Kuc
04/26/2022, 9:06 PM// service A
type Query {
foo: Foo
}
type Foo {
id: ID
bar: Bar
baz: Baz
}
// service B
extend type Foo {
id: ID // key
qux: QUX
quux QUUX
}
note: there is no query available in service B it extends a type from service A with additional fieldsSaharath Kleips
04/26/2022, 9:36 PM// service A
type Query {
foo: Foo
}
type Foo {
id: ID
barIDs: [ID]
...
}
// service B
type Bar {
id: ID
...
}
extend type Foo {
bars: [Bar]
}
If that makes sense?Dariusz Kuc
04/26/2022, 10:00 PMSaharath Kleips
04/26/2022, 10:03 PMShane Myrick
04/26/2022, 10:13 PMBox.shapeIds
as a field you could have the shape-service extend the Box
type to add a new field shapes: [Shape] @requires(fields: "shapeIds")
so you could resolve the list of ids in one callSaharath Kleips
04/26/2022, 10:16 PM