Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebClientGraphQLClient RequestBodyUriCustomizer #1290

Merged
merged 1 commit into from Oct 24, 2022

Commits on Oct 22, 2022

  1. WebClientGraphQLClient RequestBodyUriCustomizer

    The WebClientGraphQLClient now offers a mechanism to customize the URI and Header parameters per request.
    This is done by allowing the user to define a `RequestBodyUriCustomizer`, a functional interface, that
    will receive a `WebClient.RequestBodyUriSpec` and return a  `RequestBodySpecwichiBody`.
    
    The customization of the `WebClient.RequestBodyUriSpec` happens before the WebClientGraphQLClient will apply the
    `headerConsumer` and serialize the GraphQL Request as the body.
    
    Example
    ```
    val result = client.reactiveExecuteQuery(
        query = "{ hello(name: \"foo\")  }",
        requestBodyUriCustomizer = {
            it.uri { uriBuilder -> uriBuilder.queryParam("q1", "one").build() }
        }
    )
    ```
    berngp committed Oct 22, 2022
    Copy the full SHA
    0f9cd9a View commit details
    Browse the repository at this point in the history