With GraphQL Modules you can create dependencies between modules.
They will affect the initialization order, and the order in which
Providers are loaded.
To add a dependency to another module, start by adding the
imports array to your module declaration.
To see it in action, let's add a new module called
Now, we can add a direct dependency by adding to our first module:
This is useful when you just want to automatically guarantee that your module is initialized after another module.
Now GraphQL Modules will make sure to load and initialize
You can exclude some types or only some fields from a specific type while importing a module's schema into another by using
withExclusionsFromSchema like below;
MyModule does not import from
resolvers of the specified unwanted fields.