Class RequestExecutionGraphQLTransportWSImpl

    • Constructor Detail

      • RequestExecutionGraphQLTransportWSImpl

        public RequestExecutionGraphQLTransportWSImpl​(java.lang.String graphqlEndpoint,
                                                      java.lang.String graphqlSubscriptionEndpoint,
                                                      org.springframework.web.reactive.function.client.WebClient webClient,
                                                      org.springframework.web.reactive.socket.client.WebSocketClient webSocketClient,
                                                      org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction serverOAuth2AuthorizedClientExchangeFilterFunction,
                                                      OAuthTokenExtractor oAuthTokenExtractor)
    • Method Detail

      • execute

        public <R extends GraphQLRequestObject> R execute​(AbstractGraphQLRequest graphQLRequest,
                                                          java.util.Map<java.lang.String,​java.lang.Object> parameters,
                                                          java.lang.Class<R> dataResponseType)
                                                   throws GraphQLRequestExecutionException
        Description copied from interface: RequestExecution
        Execution of the given query or mutation GraphQL request, and return its response mapped in the relevant POJO. This method executes a partial GraphQL query, or a full GraphQL request.
        Specified by:
        execute in interface RequestExecution
        Overrides:
        execute in class RequestExecutionSpringReactiveImpl
        Type Parameters:
        R - The class that is generated from the query or the mutation definition in the GraphQL schema
        Parameters:
        graphQLRequest - Defines what response is expected from the server.
        parameters - the input parameters for this query. If the query has no parameters, it may be null or an empty list.
        dataResponseType - The class generated for the query or the mutation type. The data tag of the GraphQL server response will be mapped into an instance of this class.
        Returns:
        The response mapped to the code, generated from the GraphQl server. Or a wrapper for composite responses.
        Throws:
        GraphQLRequestExecutionException - When an error occurs during the request execution, typically a network error, an error from the GraphQL server or if the server response can't be parsed