-
Notifications
You must be signed in to change notification settings - Fork 345
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
Rename transform toggle ignore list #5342
Rename transform toggle ignore list #5342
Conversation
🦋 Changeset detectedLatest commit: 23b3926 The changes in this PR will be included in the next version bump. This PR includes changesets to release 109 packages
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 |
I understand the use case but not sure if that flag should be in that way. Maybe includeDefaults??? |
@ardatan Do you mean the flag should be renamed to |
Other than that, I don't see any point of toggling ignore list. If defaults are the case, the flag should be for defaults. If not, it doesn't make sense to enable and disable ignore list. |
@ardatan I just pushed the changes I mentioned in my last comment (renaming the
What do you mean with this? |
I mean if the default values in the ignore list such as native scalars and so on, the new flag should cover them not the entire ignore list. The ignore list is something provided by the user, adding another flag that toggles its behavior is extra. To summarize, if the flag disables the current behavior, |
TL;DR: This PR does not provide for modifying the default ignore list, but only to disable its application. Does this make sense to you? The ignore list is already defined in the rename transform implementation: packages/transforms/rename/src/shared.ts. The PR aims just to toggle whether it is being applied or not. I agree that it might be useful in some cases to provide a custom ignore list. For us to proceed adopting mesh, we only require skipping the ignore list (or, as an alternative, the possibility to plug in custom transforms). |
@ardatan This case is valid. as the override is for the hard-coded list of scalars, not user-defined |
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request.
Description
The rename transform uses an ignore list by default to skip renaming certain types (e.g.: scalars). This could cause potential collisions if more than one schema defines the same scalars, since those cannot be renamed to avoid the mentioned collisions.
A flag was added to the rename transform configuration, which is true by default so as to keep backwards compatibility, which allows to toggle the usage of the ignore list.
Fixes #5341
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take
action on it as appropriate
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration
Test Environment:
OS: macOS Ventura 13.3.1 (22E261)
@graphql-mesh/transform-rename: 0.14.23
NodeJS: v16.18.0
Checklist:
CONTRIBUTING doc and the
style guidelines of this project
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose
the solution you did and what alternatives you considered, etc...