Schema Registry

The Schema Registry is part of your Grafbase projects. It is responsible for managing published GraphQL schemas and helping you evolve your APIs with Schema Checks. You will interact with it through the CLI and the web dashboard.

In a federated project, 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 project 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.

In a standalone graph, there is no composition, and only one schema to track in each branch. The purpose of the Schema Registry is limited to Schema Checks only.

Was this page helpful?