Package io.smallrye.graphql.api
Annotation Interface Subscription
Specifies that the annotated method provides the implementation (ie. the
resolver) for a GraphQL subscription.
For example, a user might annotate a method as such:
For example, a user might annotate a method as such:
public class CharacterService { @Subscription @Description("Get stock quote changes as they happen") public Publisher<Stock> getStockQuote(String stockCode) { //... } }Schema generation of this would result in a stanza such as:
type Subscription { "Get stock quote changes as they happen" stockQuote(stockCode: string): [Stock] }
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String value- Returns:
- the name to use for the subscription. If empty, annotated method's name is used.
- Default:
""
-