Package org.eclipse.microprofile.graphql
Annotation Interface Description
@Target({PARAMETER,METHOD,FIELD,TYPE})
@Retention(RUNTIME)
@Documented
public @interface Description
Sets the description in the GraphQL schema for the target field, type, parameter, etc.
For example, a user might annotate a type and field as such:
For example, a user might annotate a type and field as such:
@Description("Vehicle for traveling between star systems")
public class Starship {
private String id;
private float length;
@Description("Name of a particular starship, not it's class - i.e. 'Millenium Falcon'")
private String name;
// getters/setters...
}
Schema generation of this would result in a stanza such as:
"Vehicle for traveling between star systems"
type Starship {
id: String
length: Float
"Name of a particular starship, not it's class - i.e. 'Millenium Falcon'"
name: String
}
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String value- Returns:
- the description text.
- Default:
- ""
-