wrap-cli
wrap-cli copied to clipboard
Suport "rename" annotate directive in schema
Add "rename" feature to the annotate directive in GraphQL type.
MarketData2(helloWorld=md1.hello_world)
type MarketData1 {
hello-world: String! @annotate(rename="helloWorld", exclude=true)
}
type MarketData2 {
helloWorld: String!
}
md1: MarketData1
md2 = md1.transform()
I'd expand this in the ability to add schema transformations: Here are some common transformations:
- rename field while transforming
- field/type aliases for the types that can't be represented in programming langs
- rename the field to the desired name
- exclude selected fields
- only include selected fields
- transform array of pair into a map and vice-versa
- Can in future support many such transformations if needed to