If you have many Connector subgraphs that might rely on the same sets of enums (e.g. Country, Currency) that are being received from REST APIs, what is the recommended way to “share” those across Connector subgraphs?
It seems straight forward to use Enum value mapping to convert the values, but it would be nice to have a way to not have to re-declare these for each subgraph.
Hi there,
You’ve raised a good question about how to get around some really repetitive things that need to be replicated across subgraphs.
Unfortunately, we don’t have a good solution for this yet, but it is a problem we’re actively thinking about. If you have specific thoughts on what a good solution would look like, we’d appreciate your input.
1 Like
@kevin_chu we haven’t landed on a solution yet.
Intuitively something similar to import
on the @link
directive could be an interesting avenue to explore.
Another pathway we’re evaluating is to use some local tooling to generate schema and have the output be the file that is used in our supergraph.yaml
file when doing local dev with rover dev
. That output could also be generated during CI/CD and integrated with schema publishing pipelines.
1 Like