graphql-mesh
graphql-mesh copied to clipboard
Fix bare mode resolvers for Prefix and NamingConvention transforms
Hello @ardatan , been a while; so to remind you that you cannot get rid of me, here I am with fresh PR 🙂
Description
This PR fixes the following issues with bare mode transforms.
Prefix
- The built-in resolver was always applying the prefix to the resolved typeName. Sometimes the typeName might be an extension over a resolver of another field that already went through transformation; hence the prefix might be applied multiple times. This fix ensures the prefix is not applied more than once.
Naming convention
- Bug in the built-in
defaultResolverComposer
causing the return value of an entire original result in place of a single array item - Added processing of composite fields when enum config is available so that their types get the resolver composer attached
- Prevent mapping of arguments for fields where arguments are not affected by the given config
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [x] New and existing unit tests and linter rules pass locally with my changes
I missed your PRs already <3 Do you think we can have tests to prevent future regressions?