Description
Is your feature request related to a problem? Please describe.
When using a number of different data sources, its nice to have a consistent name pattern between types under 1 source. Sometimes this can be handled by the prefix transform, but often you may want slightly more specific control
Describe the solution you'd like
Along side config value useRegExpForTypes
, have a skipPrimitives
key.
This can either be true
, to skip all or an array to define the exact primitives to skip when renaming.
Example
transforms:
- rename:
mode: bare
renames:
- from:
type: (.*)
to:
type: Banana$1
useRegExpForTypes: true
skipPrimitives: false
- prefix:
mode: bare
value: v1_
includeRootOperations: true
Which would result in
type Query {
v1_user: v1_BananaUserProfile
}
type v1_BananaUserProfile {
id: String!
}
In this above case, using the prefix plugin alone with value: v1_Banana
would result in query v1_Bananauser
which we dont want
Describe alternatives you've considered
Adding more configurability to prefix transform, or a stand alone plugin. Both I think arnt as nice as this option in the rename plugin.
Additional context