-
- All Implemented Interfaces:
@Deprecated(message = "@extends is only required in Federation v1 and can be safely omitted from Federation v2 schemas") public @interface ExtendsDirective
@extends
directive is deprecated. Federation v2 no longer requires@extends
directive due to the smart entity type merging. All usage of@extends
directive should be removed from your Federation v2 schemas.directive @extends on OBJECT | INTERFACE
Extends directive is used to represent type extensions in the schema. Native type extensions are currently unsupported by the graphql-kotlin libraries. Federated extended types should have corresponding @key directive defined that specifies primary key required to fetch the underlying object.
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! }