Schema Registry

The Schema Registry is responsible for keeping track of published schemas and helping you evolve your APIs with Schema Checks. You will interact with the registry through the CLI and the Grafbase dashboard.

In a federated graph, the schema registry is responsible for keeping track of which subgraphs are published. The schema registry needs that knowledge to fulfill its purposes:

  • Composing the subgraph schemas into a federated graph schema.
  • Assisting you in evolving these schemas individually and as a group (see Schema checks).

Each branch of a federated graph has its own set of subgraphs. Each subgraph is a live, deployed GraphQL endpoint that can be managed on Grafbase or deployed anywhere else.

From the schema registry's perspective, each subgraph can be thought of as a record with the following properties:

  • name: the identifier for a subgraph within a branch. It corresponds to the --name argument in the CLI publish and check commands. The schema, and where the url of the subgraph can changed, but its name does not.
  • url: the endpoint where the subgraph is deployed. It corresponds to the --url argument of the CLI publish command.
  • schema: the GraphQL schema of the subgraph. It corresponds to the --schema argument of the cli command.

The schema registry keeps track of published subgraphs, their names, urls and schemas. On every change, it tries to compose the subgraphs together into a federated graph.