Interface HttpSyncGraphQlClient.Builder<B extends HttpSyncGraphQlClient.Builder<B>>

Type Parameters:
B - the type of builder
All Superinterfaces:
GraphQlClient.BaseBuilder<B>, GraphQlClient.SyncBuilder<B>
Enclosing interface:
HttpSyncGraphQlClient

public static interface HttpSyncGraphQlClient.Builder<B extends HttpSyncGraphQlClient.Builder<B>> extends GraphQlClient.SyncBuilder<B>
Builder for the GraphQL over HTTP client with a blocking execution chain.
  • Method Details

    • url

      B url(String url)
      Set the GraphQL endpoint URL as a String.
      Parameters:
      url - the url to send HTTP requests to
    • url

      B url(URI url)
      Set the GraphQL endpoint URL.
      Parameters:
      url - the url to send HTTP requests to
    • header

      B header(String name, String... values)
      Add the given header to HTTP requests.
      Parameters:
      name - the header name
      values - the header values
    • headers

      B headers(Consumer<HttpHeaders> headersConsumer)
      Variant of header(String, String...) that provides access to the underlying headers to inspect or modify directly.
      Parameters:
      headersConsumer - a function that consumes the HttpHeaders
    • messageConverters

      B messageConverters(Consumer<List<HttpMessageConverter<?>>> configurer)
      Configure message converters for JSON for use in the GraphQlResponse to convert response data to higher level objects.
      Parameters:
      configurer - the configurer to apply
      Returns:
      this builder
    • restClient

      B restClient(Consumer<RestClient.Builder> builderConsumer)
      Customize the underlying RestClient.

      Note that some properties of RestClient.Builder like the base URL, headers, and message converters can be customized through this builder.

      Parameters:
      builderConsumer - a consumer that customizes the RestClient.
      See Also:
    • build

      Build the HttpSyncGraphQlClient instance.
      Specified by:
      build in interface GraphQlClient.BaseBuilder<B extends HttpSyncGraphQlClient.Builder<B>>