Class AbstractGraphqlService
java.lang.Object
com.linecorp.armeria.server.AbstractHttpService
com.linecorp.armeria.server.graphql.protocol.AbstractGraphqlService
- All Implemented Interfaces:
Unwrappable
,HttpService
,Service<HttpRequest,
HttpResponse>
A skeletal GraphQL HTTP service implementation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected HttpResponse
doGet
(ServiceRequestContext ctx, HttpRequest req) Handles aGET
request.protected HttpResponse
doPost
(ServiceRequestContext ctx, HttpRequest request) Handles aPOST
request.exchangeType
(RoutingContext routingContext) protected abstract HttpResponse
Handles aGraphqlRequest
.Methods inherited from class com.linecorp.armeria.server.AbstractHttpService
doConnect, doDelete, doHead, doOptions, doPatch, doPut, doTrace, serve
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorate
Methods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrap
Methods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Constructor Details
-
AbstractGraphqlService
public AbstractGraphqlService()
-
-
Method Details
-
doGet
Description copied from class:AbstractHttpService
Handles aGET
request. This method sends a405 Method Not Allowed
response by default.- Overrides:
doGet
in classAbstractHttpService
- Throws:
Exception
-
doPost
Description copied from class:AbstractHttpService
Handles aPOST
request. This method sends a405 Method Not Allowed
response by default.- Overrides:
doPost
in classAbstractHttpService
- Throws:
Exception
-
exchangeType
Description copied from interface:HttpService
Determines anExchangeType
for thisHttpService
from the givenRoutingContext
. By default,ExchangeType.BIDI_STREAMING
is set.Note that an
HttpRequest
will be aggregated before serving theHttpService
ifExchangeType.UNARY
orExchangeType.RESPONSE_STREAMING
is set. -
executeGraphql
protected abstract HttpResponse executeGraphql(ServiceRequestContext ctx, GraphqlRequest req) throws Exception Handles aGraphqlRequest
.- Throws:
Exception
-