All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.smallrye.graphql.client.GraphQLClient Maven / Gradle / Ivy

Go to download

SmallRye specific Client API, extending the MicroProfile client api, allowing us to play with the api first before we move it to the spec

There is a newer version: 2.11.0
Show newest version
package io.smallrye.graphql.client;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks an injection point that should receive a named GraphQL client instance.
 * Configuration of the client needs to be provided through config properties.
 *
 * Example of injecting a dynamic client:
 *
 * `@Inject`
 * `@NamedClient("countries")`
 * DynamicGraphQLClient countriesClient;
 *
 * Definition of the client via system properties:
 * smallrye.graphql.client.countries/url=https://countries.trevorblades.com/
 * Passing a HTTP header:
 * smallrye.graphql.client.countries/header/Authorization=Bearer 123456
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.PARAMETER })
public @interface GraphQLClient {

    String value();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy