Files
kami-parse-server/src/GraphQL/transformers/className.js
Antoine Cormouls 59b0221fec GraphQL: Renaming Types/Inputs (#5883)
* Renaming GraphQL Types/Inputs

* Add Native Type to avoid collision

* Use pluralize for renaming

* Fixing tests

* Improve name collision management - tests passsing

* Renaming few more default types

* Rename file input

* Reverting fields types to not collide with the relay spec types
Improver users mutations

* Adding ArrayResult to the reserved list

* Fixing tests

* Add more unit tests to ParseGraphQLSchema

* Test transformClassNameToGraphQL

* Name collision tests
2019-08-15 14:23:41 -07:00

9 lines
223 B
JavaScript

const transformClassNameToGraphQL = className => {
if (className[0] === '_') {
className = className.slice(1);
}
return className[0].toUpperCase() + className.slice(1);
};
export { transformClassNameToGraphQL };