Class GraphQLRouter

java.lang.Object
io.evitadb.externalApi.graphql.io.GraphQLRouter
All Implemented Interfaces:
io.undertow.server.HttpHandler

public class GraphQLRouter extends Object implements io.undertow.server.HttpHandler
Custom Undertow router for GraphQL APIs.
Author:
Lukáš Hornych, FG Forrest a.s. (c) 2024
  • Field Details

  • Constructor Details

    • GraphQLRouter

      public GraphQLRouter()
  • Method Details

    • handleRequest

      public void handleRequest(io.undertow.server.HttpServerExchange httpServerExchange) throws Exception
      Specified by:
      handleRequest in interface io.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

      public void unregisterCatalogApis(@Nonnull String catalogName)
      Unregisters all APIs associated with the defined catalog.