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 issue with naming-convention in bare mode and nested Input types #4896

Closed
wants to merge 3 commits into from

Conversation

jamessharp
Copy link
Contributor

@jamessharp jamessharp commented Dec 6, 2022

Description

Using the naming-convention transform in "bare" mode, it doesn't correctly transform nested field argument Input types. See #4895 for details.

The code for this transform was only operating at the root level of any Inputs when considering field arguments. This fix adapts the code to fully iterate through any Inputs, including nested ones.

Fixes #4895

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Modified the bareNamingConvention spec to include this scenario

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
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@changeset-bot
Copy link

changeset-bot bot commented Dec 6, 2022

🦋 Changeset detected

Latest commit: 6e52c8a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@graphql-mesh/transform-naming-convention Patch
grpc-example Patch
grpc-reflection-example Patch
json-schema-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ardatan
Copy link
Owner

ardatan commented Dec 7, 2022

Could you add a changeset with yarn changeset? Thanks :)

@jamessharp
Copy link
Contributor Author

Done

@santino
Copy link
Contributor

santino commented Dec 7, 2022

Hi @jamessharp ,
thank you so much for your contribution to the bare implementation of this transform.

Can I ask you to run yarn prettier just to align the formatting to the project standards and make it easier to follow the changes?

I had a look at your changes and I will be doing some testing soon; so it won't hopefully be long since we are happy to merge this.

@jamessharp
Copy link
Contributor Author

Ah - I think your prettier config may have changed - I've just run yarn prettier and now have 267 files changed, which would explain the changes in this PR (I have "run prettier on save" enabled in vscode)

I'm more than happy to commit the extra , or manually undo the prettier changes in this PR, as you see fit!

@ardatan
Copy link
Owner

ardatan commented Dec 19, 2022

I think we can take of prettier later. So if it is good for you other than prettier @santino , we can merge it.

@jamessharp
Copy link
Contributor Author

Hi @ardatan / @santino - any update on this? I've just rebased it onto the latest master.

@ardatan ardatan force-pushed the master branch 2 times, most recently from c3c0b9e to 696f9c7 Compare February 14, 2023 05:53
@ardatan
Copy link
Owner

ardatan commented Apr 3, 2023

I don't have an access to your branch so creating a new PR.
Thanks for the fix!

@ardatan ardatan closed this Apr 3, 2023
@theguild-bot theguild-bot mentioned this pull request Apr 24, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
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.

naming-convention not correctly handling Input types in bare mode
3 participants