Package com.netflix.graphql.dgs
Annotation Interface DgsData
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Inherited
public @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 ClassesModifier and TypeClassDescriptionstatic @interfaceContainer annotation that aggregates several@DgsDataannotations. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
parentType
String parentType
-
-
-
field
String field- Default:
- ""
-
trivial
boolean trivialIndicates 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
-