Prune Transform
💡
This page is currently under construction and expected to change. Please feel free to reach out to us directly in case you are having any troubles.
The prune transform allows you removing unused and empty types.
How to use?
mesh-config.ts
import {
createPruneTransform,
defineConfig,
loadGraphQLHTTPSubgraph
} from '@graphql-mesh/compose-cli'
export const composeConfig = defineConfig({
subgraphs: [
{
sourceHandler: loadGraphQLHTTPSubgraph('Users', {
endpoint: 'http://localhost:4001/users'
}),
transforms: [
createPruneTransform({
// Skip pruning for specific types
skipPruning: ['MyPrecioiusType']
})
]
}
]
})