Annotation LinkDirective
-
- All Implemented Interfaces:
public @interface LinkDirective
directive @link(url: String!, as: String, import: [Import]) repeatable on SCHEMA
The
@link
directive links definitions within the document to external schemas.External schemas are identified by their url, which should end with a specification name and version with the following format:
{NAME}/v{MAJOR}.{MINOR}
, e.g.url = "https://specs.apollo.dev/federation/v2.5"
.External types are associated with the target specification by annotating it with
@LinkedSpec
meta annotation. External types defined in the specification will be automatically namespaced (prefixed with{NAME}__
) unless they are explicitly imported. While both custom namespace (as
) and import arguments are optional, due to https://github.com/ExpediaGroup/graphql-kotlin/issues/1830 we currently always require those values to be explicitly provided.