apollographql / apollographql/federation

Adds some higher level API to work with supergraph schema

Open
#1,981 0 comments 0 reactions 1 assignee Claimed by @pcmanus View on GitHub
Dominant language
TypeScript
Stars
725
Forks
276
Avg merge
1h 47m
Merged PRs (30d)
1

Description

A supergraph schema is essentially just the "API schema" plus some `join` directives metadata.

The "API schema" part can be extracted easily enough with the `Schema#toAPISchema` method.

The `join` directives hold a lot of useful information (enough to rebuild the subgraphs in fact) but currently we lack convenience methods to retrieve some of that information, so one wanting to get such information would need to manually look at the `join` directives, but doing so is very fragile as such code could easily be broken if we change the `join` spec later (which we'll do, eventually).

To take a more concrete example, given supergraph schema, tooling may want to ask questions like "which subgraphs actually defines some type or field", so we're simply proposing to provide a new method that provides such information directly and wouldn't change even if we later drastically change the internal format of the supergraph schema.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.