Package 

Annotation ShareableDirective

  • All Implemented Interfaces:

    
    public @interface ShareableDirective
    
                        
    directive @shareable repeatable on FIELD_DEFINITION | OBJECT

    Shareable directive indicates that given object and/or field can be resolved by multiple subgraphs. If an object is marked as @shareable then all its fields are automatically shareable without the need for explicitly marking them with @shareable directive. All fields referenced from @key directive are automatically shareable as well.

    Example:

    type Product @key(fields: "id") {
      id: ID!                           # shareable because id is a key field
      name: String                      # non-shareable
      description: String @shareable    # shareable
    }
    
    type User @key(fields: "email") @shareable {
      email: String                    # shareable because User is marked shareable
      name: String                     # shareable because User is marked shareable
    }
    • 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