in graphql-dgs-client/src/main/kotlin/com/netflix/graphql/dgs/client/GraphQLClient.kt [31:100]
fun executeQuery(
@Language("graphql") query: String,
): GraphQLResponse
/**
* A blocking call to execute a query and parse its result.
* @param query The query string. Note that you can use [code generation](https://netflix.github.io/dgs/generating-code-from-schema/#generating-query-apis-for-external-services) for a type safe query!
* @param variables A map of input variables
* @return [GraphQLResponse] parses the response and gives easy access to data and errors.
*/
fun executeQuery(
@Language("graphql") query: String,
variables: Map<String, Any>,
): GraphQLResponse
/**
* A blocking call to execute a query and parse its result.
* @param query The query string. Note that you can use [code generation](https://netflix.github.io/dgs/generating-code-from-schema/#generating-query-apis-for-external-services) for a type safe query!
* @param variables A map of input variables
* @param operationName Name of the operation
* @return [GraphQLResponse] parses the response and gives easy access to data and errors.
*/
fun executeQuery(
@Language("graphql") query: String,
variables: Map<String, Any>,
operationName: String?,
): GraphQLResponse
@Deprecated(
"The RequestExecutor should be provided while creating the implementation. Use CustomGraphQLClient/CustomMonoGraphQLClient instead.",
ReplaceWith("Example: new CustomGraphQLClient(url, requestExecutor);"),
)
fun executeQuery(
query: String,
variables: Map<String, Any>,
requestExecutor: RequestExecutor,
): GraphQLResponse = throw UnsupportedOperationException()
@Deprecated(
"The RequestExecutor should be provided while creating the implementation. Use CustomGraphQLClient/CustomMonoGraphQLClient instead.",
ReplaceWith("Example: new CustomGraphQLClient(url, requestExecutor);"),
)
fun executeQuery(
@Language("graphql") query: String,
variables: Map<String, Any>,
operationName: String?,
requestExecutor: RequestExecutor,
): GraphQLResponse = throw UnsupportedOperationException()
companion object {
@JvmStatic
fun createCustom(
url: String,
requestExecutor: RequestExecutor,
) = CustomGraphQLClient(url, requestExecutor)
@JvmStatic
fun createCustom(
url: String,
requestExecutor: RequestExecutor,
mapper: ObjectMapper,
) = CustomGraphQLClient(url, requestExecutor, mapper)
@JvmStatic
fun createCustom(
url: String,
requestExecutor: RequestExecutor,
options: GraphQLRequestOptions,
) = CustomGraphQLClient(url, requestExecutor, options)
}