Hi Bertrand,

> On 25 Jun 2021, at 11:32, Bertrand Delacretaz <[email protected]> wrote:
> 
> Hi,
> 
> I'm planning to use that pattern for [1], similar to what we do for
> initial content loading, using a BundleTracker [2] to track bundles.

A BundleTracker is also the core of running Sling with precompiled scripts, 
provided by several client bundles.


> 
> The use case is multiple bundles providing partial GraphQL schemas as
> text file resources to a service that aggregates them.

To make sure that everything works as expected I’d create a capability in 
o.a.s.graphql.schema that the bundles which provide schema extensions would 
require, in order to create the wiring in between the bundles. This way you’ll 
have a limited number of bundles that would trigger the BundleTracker and you 
also create a weak contract.

> 
> It's been a long time since I created a module that uses this
> technique, is that still the recommended way of doing such things?
> 
> -Bertrand
> 
> [1] 
> https://github.com/apache/sling-whiteboard/tree/master/sling-org-apache-sling-graphql-schema
> [2] 
> https://docs.osgi.org/javadoc/r4v42/org/osgi/util/tracker/BundleTracker.html


Regards,
Radu

Reply via email to