java.lang.Object
io.evitadb.externalApi.graphql.io.GraphQLRouter
- All Implemented Interfaces:
com.linecorp.armeria.common.util.Unwrappable,com.linecorp.armeria.server.HttpService,com.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse>
Custom HTTP router for GraphQL APIs.
- Author:
- Lukáš Hornych, FG Forrest a.s. (c) 2024
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrefreshCatalogApi(String catalogName, GraphQLInstanceType instanceType, graphql.GraphQL newApi) Swaps GraphQL instance for already registered API for defined catalogvoidregisterCatalogApi(String catalogName, GraphQLInstanceType instanceType, graphql.GraphQL api) Registers new endpoints for defined catalog.voidregisterSystemApi(graphql.GraphQL systemApi) Registers new system endpoints.com.linecorp.armeria.common.HttpResponseserve(com.linecorp.armeria.server.ServiceRequestContext ctx, com.linecorp.armeria.common.HttpRequest req) voidunregisterCatalogApis(String catalogName) Unregisters all APIs associated with the defined catalog.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorate, exchangeType, optionsMethods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrapMethods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Field Details
-
SYSTEM_PREFIX
- See Also:
-
-
Constructor Details
-
GraphQLRouter
public GraphQLRouter()
-
-
Method Details
-
serve
@Nonnull public com.linecorp.armeria.common.HttpResponse serve(@Nonnull com.linecorp.armeria.server.ServiceRequestContext ctx, @Nonnull com.linecorp.armeria.common.HttpRequest req) throws Exception - Specified by:
servein interfacecom.linecorp.armeria.server.HttpService- Specified by:
servein interfacecom.linecorp.armeria.server.Service<com.linecorp.armeria.common.HttpRequest,com.linecorp.armeria.common.HttpResponse> - Throws:
Exception
-
registerSystemApi
public void registerSystemApi(@Nonnull graphql.GraphQL systemApi) Registers new system endpoints. -
registerCatalogApi
public void registerCatalogApi(@Nonnull String catalogName, @Nonnull GraphQLInstanceType instanceType, @Nonnull graphql.GraphQL api) Registers new endpoints for defined catalog. -
refreshCatalogApi
public void refreshCatalogApi(@Nonnull String catalogName, @Nonnull GraphQLInstanceType instanceType, @Nonnull graphql.GraphQL newApi) Swaps GraphQL instance for already registered API for defined catalog -
unregisterCatalogApis
Unregisters all APIs associated with the defined catalog.
-