-
public @interface ExternalDirective
directive @external on FIELD_DEFINITION
The @external directive is used to mark a field as owned by another service. This allows service A to use fields from service B while also knowing at runtime the types of that field. @external directive is only applicable on federated extended types. All the external fields should either be referenced from the @key, @requires or @provides directives field sets.
Example: Given
@KeyDirective(FieldSet("id")) @ExtendsDirective class Product(@ExternalDirective val id: String) { fun newFunctionality(): String = "whatever" }
should generate
type Product @extends @key(fields : "id") { id: String! @external newFunctionality: String! }