Package 

Annotation ExternalDirective

  • All Implemented Interfaces:

    
    public @interface ExternalDirective
    
                        
    # federation v1 definition
    directive @external on FIELD_DEFINITION
    
    # federation v2 definition
    directive @external on OBJECT | 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.

    Due to the smart merging of entity types, @external directive is no longer required on @key fields and can be omitted from the schema. @external directive is only required on fields referenced by the @requires and @provides directive.

    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!
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail