Reputation: 1
I use the Quarkus SmallRye GraphQL extension and I'd like to override a couple of lines in the render.js
file.
I created a Quarkus extension in which, similarly as in SmallRyeGraphQLProcessor, I added a build step that produced a WebJarBuildItem
with an appropriate WebJarResourcesFilter
.
During the build of an application, a Quarkus WebJarProcessor
produces a map of jar overrides.
Map<GACT, WebJarResultsBuildItem.WebJarResult> results = new HashMap();
As I had two WebJarBuildItem
s for one artifact, one of the items overwrote the second one (in no particular order). As a result, only one from the jar overrides was applied.
I achieved the goal by keeping the overwritten render.js
file in memory and responding with a desired content using a request filter. But I'm looking for a better solution.
Upvotes: 0
Views: 27
Reputation: 457
If what you are changing can benefit everyone, just do a PR against the SmallRye repo. If not, rather than creating a new extension, you can include the render file in your app and that should be served in place of the one from the extension, just make sure the url stays the same
Upvotes: 0