encapsulate transform allow you to easily encapsulate a specific schema into a single field under the root type.
For instance, if your handler created a schema like this, named
encapsulate transform will change your schema to this:
This transformer is useful when you have multiple APIs in your Mesh, and you wish to have it wrapped with a name to have a better understanding on where each field is coming from.
To get started with this transform, install it from npm:
String) - Optional, name to use for grouping under the root types. If not specific, the API name is used.
Object) - Allow you to choose which root operations you would like to apply. By default, it's applied to all root types.: