Annotation Interface DgsData


Mark a method to be a data fetcher. A data fetcher can receive the DataFetchingEnvironment. The "parentType" property is the type that contains this field. For root queries that is "Query", and for root mutations "Mutation". The field is the name of the field this data fetcher is responsible for. See https://netflix.github.io/dgs/getting-started/
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Container annotation that aggregates several @DgsData annotations.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
    boolean
    Indicates whether the generated DataFetcher for this method should be considered trivial.
  • Element Details

    • parentType

      String parentType
    • field

      String field
      Default:
      ""
    • trivial

      boolean trivial
      Indicates whether the generated DataFetcher for this method should be considered trivial. For instance, if a method is simply pulling data from an object and not doing any I/O, there may be some performance benefits to marking it as trivial.
      See Also:
      • TrivialDataFetcher
      Default:
      false