Execute an asynchronous GraphQL query using the specified parameters and return a Promise that will be resolved with the result
the parameters can contain the following keys:
query (string) : the GraphQL query to be executed
operationName (string) : the GraphQL operation name
variables: the variables as a JSON string or a Map<String, Object>
renderContext (RenderContext) : the render context
if the renderContext is null, a request will be created with the parameters that were passed,
otherwise the request from the renderContext will be used.
a Promise that will be resolved with the result of the query as a JSON structure or with an error message if there was an error executing the query
Execute a synchronous GraphQL query using the specified parameters and return the result
the parameters can contain the following keys:
query (string) : the GraphQL query to be executed
operationName (string) : the GraphQL operation name
variables: the variables as a JSON string or a Map<String, Object>
renderContext (RenderContext) : the render context
if the renderContext is null, a request will be created with the parameters that were passed,
otherwise the request from the renderContext will be used.
the result of the query as a JSON structure
ServletException
IOException
Helper class to execute GraphQL queries. It provides both synchronous and asynchronous methods to execute queries.