Interface WebGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>>

Type Parameters:
B - the type of builder
All Superinterfaces:
GraphQlClient.BaseBuilder<B>, GraphQlClient.Builder<B>
All Known Subinterfaces:
HttpGraphQlClient.Builder<B>, WebSocketGraphQlClient.Builder<B>
Enclosing interface:
WebGraphQlClient

public static interface WebGraphQlClient.Builder<B extends WebGraphQlClient.Builder<B>> extends GraphQlClient.Builder<B>
Base builder for GraphQL clients over a Web transport.
  • Method Details

    • url

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

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

      B header(String name, String... values)
      Add the given header to HTTP requests or to the WebSocket handshake request.
      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
    • codecConfigurer

      B codecConfigurer(Consumer<CodecConfigurer> codecsConsumer)
      Configure JSON encoders and decoders for use in the GraphQlResponse to convert response data to higher level objects.
      Parameters:
      codecsConsumer - a callback that customizes the configured codecs
    • build

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