graphql-tools icon indicating copy to clipboard operation
graphql-tools copied to clipboard

fix: link merging

Open cdaringe opened this issue 8 months ago • 2 comments

🚨 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

Link directives are not correctly merged correctly when the URL matches.

Related # (issue)

https://github.com/ardatan/graphql-tools/issues/6929#issuecomment-2649611354

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

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

  • [x] unit testes

Test Environment:

  • OS: macOS
  • @graphql-tools/...:
  • NodeJS: 20.x

Checklist:

  • [ ] 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
  • [ ] 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
  • [x] New and existing unit tests and linter rules pass locally with my changes
  • [na] Any dependent changes have been merged and published in downstream modules

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...

Summary by CodeRabbit

  • New Features
    • Enhanced schema merging now distinguishes directives based on unique URL arguments, ensuring more precise integration when combining multiple schemas.
  • Tests
    • Updated tests validate the improved merging behavior across extended schemas, ensuring accuracy and reliable consolidation of directives.

cdaringe avatar Feb 23 '25 08:02 cdaringe