Working with Metadata
What is metadata?
Your Hasura metadata describes every aspect of your supergraph and is used to build it into the GraphQL schema that defines your API.
This is done by validating and combining the various objects in your metadata, including subgraphs, connectors, models, commands, relationships, permissions and more.
Metadata is written in Hasura Metadata Language (HML), which is a declarative extension of YAML.
How is metadata generated?
When you initialize a new local supergraph project, the DDN CLI scaffolds a set of metadata files and default subgraphs and configurations for you to start building your API.
The CLI is also used to perform many other metadata creation and management operations such as:
- Creating new subgraphs
- Managing the connection to data sources
- Generating models and commands from existing data sources
- Updating models and commands
- Generating relationships
How is metadata edited?
The Hasura VS Code extension provides syntax highlighting and auto-complete for your metadata.
The DDN CLI will also validate your metadata when you use it to create a build.
Next steps
On each page in this section, you'll find detailed information about the various components of Hasura DDN which you can author and modify in your metadata. Each page will provide you with an overview of the components, how they work, and examples of how to use them. Below all of this, you'll find detailed reference information about the metadata structure and the fields that you can use to define each component.