Package org.restheart.exchange
Class GraphQLRequest
java.lang.Object
org.restheart.exchange.Exchange<com.google.gson.JsonElement>
org.restheart.exchange.Request<com.google.gson.JsonElement>
org.restheart.exchange.ServiceRequest<com.google.gson.JsonElement>
org.restheart.exchange.GraphQLRequest
-
Field Summary
Fields inherited from class org.restheart.exchange.ServiceRequest
content, CONTENT_INJECTEDFields inherited from class org.restheart.exchange.Request
PATCH, PIPELINE_INFO_KEY, SLASH, UNDERSCOREFields inherited from class org.restheart.exchange.Exchange
APPLICATION_PDF_TYPE, FORM_URLENCODED, HAL_JSON_MEDIA_TYPE, IN_ERROR_KEY, JSON_MEDIA_TYPE, MAX_BUFFERS, MAX_CONTENT_SIZE, MULTIPART, TEXT_PLAIN_CONTENT_TYPE, wrapped -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()com.google.gson.JsonObjectbooleanstatic GraphQLRequeststatic GraphQLRequestof(io.undertow.server.HttpServerExchange exchange) com.google.gson.JsonElementParses the content from the exchange and converts it into an instance of the specified typeT.Methods inherited from class org.restheart.exchange.ServiceRequest
getContent, isContentInjected, isHandledBy, of, setContent, setContentInjectedMethods inherited from class org.restheart.exchange.Request
addXForwardedHeader, blockForTooManyRequests, getAuthenticatedAccount, getContentType, getContentType, getCookie, getHeader, getHeaders, getMethod, getPath, getPathParam, getPathParams, getPipelineInfo, getPipelineInfo, getQueryParameterOfDefault, getQueryParameterOrDefault, getQueryParameters, getQueryString, getRequestContentLength, getStartTime, getURL, getXForwardedHeaders, isAuthenticated, isBlockForTooManyRequests, isDelete, isGet, isOptions, isPatch, isPost, isPut, pipelineInfo, setContentLength, setContentType, setContentTypeAsJson, setHeader, setHeader, setPipelineInfo, setPipelineInfo, setStartTimeMethods inherited from class org.restheart.exchange.Exchange
getExchange, getWrappedExchange, isAccountInRole, isAuthenticated, isContentTypeFormOrMultipart, isContentTypeFormOrMultipart, isContentTypeJson, isContentTypeJson, isContentTypeText, isContentTypeXml, isInError, isInError, responseInterceptorsExecuted, setInError, setInError, setResponseInterceptorsExecuted, updateBufferSize
-
Method Details
-
init
public static GraphQLRequest init(io.undertow.server.HttpServerExchange exchange, String appUri) throws IOException, com.google.gson.JsonSyntaxException, BadRequestException - Throws:
IOExceptioncom.google.gson.JsonSyntaxExceptionBadRequestException
-
of
-
parseContent
Description copied from class:ServiceRequestParses the content from the exchange and converts it into an instance of the specified typeT. This method retrieves data from the exchange, interprets it according to the expected format, and attempts to convert this data into an object of typeT.- Specified by:
parseContentin classServiceRequest<com.google.gson.JsonElement>- Returns:
- an instance of
Trepresenting the parsed content - Throws:
IOException- if an IO error occursBadRequestException- if the content does not match the expected format for typeT
-
getQuery
-
getOperationName
-
getVariables
public com.google.gson.JsonObject getVariables() -
getGraphQLAppURI
-
hasVariables
public boolean hasVariables()
-