Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bare mode resolvers for Prefix and NamingConvention transforms #6217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

santino
Copy link
Contributor

@santino santino commented Oct 26, 2023

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.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests and linter rules pass locally with my changes

@codesandbox
Copy link

codesandbox bot commented Oct 26, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@ardatan
Copy link
Owner

ardatan commented Oct 26, 2023

I missed your PRs already <3 Do you think we can have tests to prevent future regressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants