Hey folks. This is similar to a question that was posted a few days back.
Has anyone found a nice way to extend a non entity in a federated graph? Or extend an entity that isn’t really a concrete entity.
Gor example, i have a domain concept that never has a unique ID but is useful for segregating part of the graph. Let’s call it AbstractConcept.
If two DGSs want to add fields to that AbstractConcept then one of them will need to “own” it for the resolution to work correctly.
I could do that but it means that:
- I need to pick an arbitrary ID for this AbstractConcept field
- I need to call the owning DGS always, even if it doesn’t own any of the concrete types being queried for
My solutions here seem to be one of the following:
- Remove the abstract type and namespace in another way (from talking to our domain experts this seems incredibly difficult / impossible)
- Just accept that one DGS is coupled to that type and make sure it is always available and use some caching
- Register the abstract type in the gateway itself so that when that type is asked for, the gateway resolves it and there is no coupling of DGSs (seems like a hack but does at least ensure availability)
Anyone come up against this and solved it?