⚠️
This is the documentation for the old GraphQL Mesh version v0. We recommend upgrading to the latest GraphQL Mesh version v1.
Migrate to GraphQL Mesh v1
Migrate to GraphQL Mesh v1
Prune Transform
The prune transform allows you removing unused and empty types.
npm i @graphql-mesh/transform-pruneHow to use?
Add the following configuration to your Mesh config file:
.meshrc.yaml
transforms:
  - prune:
      skipPruning: []Config API Reference
- skipPruning(type:- Array of String, required) - Types to skip pruning
- skipEmptyCompositeTypePruning(type:- Boolean) - Set to- trueto skip pruning object types or interfaces with no fields
- skipUnimplementedInterfacesPruning(type:- Boolean) - Set to- trueto skip pruning interfaces that are not implemented by any other types
- skipEmptyUnionPruning(type:- Boolean) - Set to- trueto skip pruning empty unions
- skipUnusedTypesPruning(type:- Boolean) - Set to- trueto skip pruning unused types