execute

abstract fun <T : Query.Data> execute(query: Query<T>): T

Executes a GraphQL query and returns the result.

Return

The result of the query execution.

Parameters

query

The GraphQL query to execute.

The type of data returned by the query, extending `Query.Data`.

Throws

ExpediaGroupServiceException

If the query execution returns errors.


abstract fun <T : Mutation.Data> execute(mutation: Mutation<T>): T

Executes a GraphQL mutation and returns the result.

Return

The result of the mutation execution.

Parameters

mutation

The GraphQL mutation to execute.

The type of data returned by the mutation, extending `Mutation.Data`.

Throws

ExpediaGroupServiceException

If the mutation execution returns errors.