java.lang.Object
io.evitadb.externalApi.graphql.io.GraphQLRouter
- All Implemented Interfaces:
io.undertow.server.HttpHandler
Custom Undertow router for GraphQL APIs.
- Author:
- Lukáš Hornych, FG Forrest a.s. (c) 2024
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(io.undertow.server.HttpServerExchange httpServerExchange) voidrefreshCatalogApis(String catalogName, graphql.GraphQL newDataApi, graphql.GraphQL newSchemaApi) Swaps GraphQL instances for already registered APIs for defined catalogvoidregisterCatalogApis(String catalogName, graphql.GraphQL dataApi, graphql.GraphQL schemaApi) Registers new endpoints for defined catalog.voidregisterSystemApi(graphql.GraphQL systemApi) Registers new system endpoints.voidunregisterCatalogApis(String catalogName) Unregisters all APIs associated with the defined catalog.
-
Field Details
-
SYSTEM_PREFIX
- See Also:
-
-
Constructor Details
-
GraphQLRouter
public GraphQLRouter()
-
-
Method Details
-
handleRequest
public void handleRequest(io.undertow.server.HttpServerExchange httpServerExchange) throws Exception - Specified by:
handleRequestin interfaceio.undertow.server.HttpHandler- Throws:
Exception
-
registerSystemApi
public void registerSystemApi(@Nonnull graphql.GraphQL systemApi) Registers new system endpoints. -
registerCatalogApis
public void registerCatalogApis(@Nonnull String catalogName, @Nonnull graphql.GraphQL dataApi, @Nonnull graphql.GraphQL schemaApi) Registers new endpoints for defined catalog. -
refreshCatalogApis
public void refreshCatalogApis(@Nonnull String catalogName, @Nonnull graphql.GraphQL newDataApi, @Nonnull graphql.GraphQL newSchemaApi) Swaps GraphQL instances for already registered APIs for defined catalog -
unregisterCatalogApis
Unregisters all APIs associated with the defined catalog.
-