Class GraphiQLUIDeploymentProcessor
- java.lang.Object
-
- org.wildfly.extension.microprofile.graphql.deployment.GraphiQLUIDeploymentProcessor
-
- All Implemented Interfaces:
org.jboss.as.server.deployment.DeploymentUnitProcessor
public class GraphiQLUIDeploymentProcessor extends Object implements org.jboss.as.server.deployment.DeploymentUnitProcessor
This processor locates the META-INF/resources/graphql-ui/render.js file in GraphQL deployments that contain Graphiql UI (as a library jar) and updates them on-the-fly to contain the correct path to the right /graphql endpoint, that is including context root of the application that is being deployed. FIXME: this assumes that graphql-ui jar is part of the WAR deployment. A better solution could be to distribute it with WildFly as a static module and somehow append it to GraphQL deployments.
-
-
Constructor Summary
Constructors Constructor Description GraphiQLUIDeploymentProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext)voidundeploy(org.jboss.as.server.deployment.DeploymentUnit context)StringupdateApiUrl(String original, String graphqlPath)
-
-
-
Method Detail
-
deploy
public void deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) throws org.jboss.as.server.deployment.DeploymentUnitProcessingException- Specified by:
deployin interfaceorg.jboss.as.server.deployment.DeploymentUnitProcessor- Throws:
org.jboss.as.server.deployment.DeploymentUnitProcessingException
-
undeploy
public void undeploy(org.jboss.as.server.deployment.DeploymentUnit context)
- Specified by:
undeployin interfaceorg.jboss.as.server.deployment.DeploymentUnitProcessor
-
-