Package org.eclipse.microprofile.graphql
Annotation Interface Query
Specifies that the annotated method provides the implementation (ie. the
resolver) for a GraphQL query.
For example, a user might annotate a method as such:
For example, a user might annotate a method as such:
public class CharacterService { @Query("friendsOf") @Description("Returns all the friends of a character") public List<Character> getFriendsOf(Character character) { //... } }Schema generation of this would result in a stanza such as:
type Query { # Returns all the friends of a character friendsOf(character: CharacterInput): [Character] }
-
Optional Element Summary
-
Element Details
-
value
String value- Returns:
- the name to use for the query. If empty, annotated method's name is used.
- Default:
- ""
-