Annotation Interface GraphQLClientApi


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface GraphQLClientApi
Annotate your GraphQL Client interface as GraphQLClientApi, so CDI can build and inject it for you.

Example:

 @GraphQLClientApi
 public interface SuperHeroesApi {
     List<Hero> allHeroes();
 }

 @Inject
 SuperHeroesApi superHeroesApi;
 
You can optionally add some fallback configuration with this annotation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The base key used to read configuration values.
    The URL where the GraphQL service is listening
  • Element Details

    • endpoint

      String endpoint
      The URL where the GraphQL service is listening
      Default:
      ""
    • configKey

      String configKey
      The base key used to read configuration values. Defaults to the fully qualified name of the API interface.
      Default:
      ""