Module evita.external.api.graphql
Class GraphQLSchemaHandler
java.lang.Object
io.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
io.evitadb.externalApi.graphql.io.GraphQLSchemaHandler
- All Implemented Interfaces:
io.undertow.server.HttpHandler
public class GraphQLSchemaHandler
extends io.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
HTTP request handler for returning
GraphQLSchema as a DSL string using passed
configured instance of GraphQL.- Author:
- Lukáš Hornych, FG Forrest a.s. 2023
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEndpointExchange(io.undertow.server.HttpServerExchange serverExchange, String httpMethod, String requestBodyMediaType, String preferredResponseMediaType) protected <T extends io.evitadb.externalApi.exception.ExternalApiInternalError>
TcreateInternalError(String message) protected <T extends io.evitadb.externalApi.exception.ExternalApiInternalError>
TcreateInternalError(String message, Throwable cause) protected <T extends io.evitadb.externalApi.exception.ExternalApiInvalidUsageException>
TcreateInvalidUsageException(String message) protected io.evitadb.externalApi.http.EndpointResponseprotected voidwriteResult(GraphQLSchemaHandler.GraphQLEndpointExchange exchange, OutputStream outputStream, Object response) Methods inherited from class io.evitadb.externalApi.http.EndpointHandler
afterRequestHandled, beforeRequestHandled, getSupportedRequestContentTypes, handleRequest, parseRequestBody, readRawRequestBody, validateRequest
-
Constructor Details
-
GraphQLSchemaHandler
-
-
Method Details
-
createEndpointExchange
@Nonnull protected GraphQLSchemaHandler.GraphQLEndpointExchange createEndpointExchange(@Nonnull io.undertow.server.HttpServerExchange serverExchange, @Nonnull String httpMethod, @Nullable String requestBodyMediaType, @Nullable String preferredResponseMediaType) - Specified by:
createEndpointExchangein classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
doHandleRequest
@Nonnull protected io.evitadb.externalApi.http.EndpointResponse doHandleRequest(@Nonnull GraphQLSchemaHandler.GraphQLEndpointExchange exchange) - Specified by:
doHandleRequestin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
createInternalError
@Nonnull protected <T extends io.evitadb.externalApi.exception.ExternalApiInternalError> T createInternalError(@Nonnull String message) - Specified by:
createInternalErrorin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
createInternalError
@Nonnull protected <T extends io.evitadb.externalApi.exception.ExternalApiInternalError> T createInternalError(@Nonnull String message, @Nonnull Throwable cause) - Specified by:
createInternalErrorin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
createInvalidUsageException
@Nonnull protected <T extends io.evitadb.externalApi.exception.ExternalApiInvalidUsageException> T createInvalidUsageException(@Nonnull String message) - Specified by:
createInvalidUsageExceptionin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
getSupportedHttpMethods
- Specified by:
getSupportedHttpMethodsin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
getSupportedResponseContentTypes
- Overrides:
getSupportedResponseContentTypesin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-
writeResult
protected void writeResult(@Nonnull GraphQLSchemaHandler.GraphQLEndpointExchange exchange, @Nonnull OutputStream outputStream, @Nonnull Object response) - Overrides:
writeResultin classio.evitadb.externalApi.http.EndpointHandler<GraphQLSchemaHandler.GraphQLEndpointExchange>
-