tag1.0.0

Build schema contracts with the @tag directive

Tag extension

Build a contract with the @tag extension defined as:

directive @tag( name: String! ) repeatable on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION

The contract key is a JSON with two optional keys includedTags and excludedTags:

{ "includedTags": ["a"], "excludedTags": ["b"] }

If the includedTags list is empty, the contract schema includes each type and object/interface field unless it's tagged with an excluded tag.

If the includedTags list is non-empty, the contract schema excludes each union type and object/interface field unless it's tagged with an included tag.

Unreachable types can be hidden with the following configuration:

[extensions.tag.config] hide_unreachable_types = true
1 Aug, 2025
Julius de Bruijn
InstallAdd this to your TOML configuration file:
[extensions] tag = "1.0.0"