prefix transforms allow you to add prefixes to existing GraphQL types and root operations
prefix is similar to
rename in that it
allows you to modify names to avoid conflicts, simplify complicated names, and change the appearance
of your query. In contrast with
prefix is simpler and only allows you to append a
prefix to the existing name.
You can use it to easily "namespace" APIs in your unified API and avoid conflicts.
npm i @graphql-mesh/transform-prefix
Add the following configuration to your Mesh config file:
transforms: - prefix: mode: bare | wrap value: MyApi_
String (bare | wrap)) - Specify to apply prefix transform to bare schema or by wrapping original schema
String) - The prefix to apply to the schema types. By default it's the API name.
Array of String, required) - List of ignored types
Boolean) - Changes root types and changes the field names (default: false)
Boolean) - Changes types (default: true)