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

[NEW] Transfer schema Transform

Open santino opened this issue 3 years ago • 1 comments

Description

This PR introduces a new transform to copy and/or move parts of a GraphQL schema. It allows to copy/move fields from one Type to another. Similarly, it also allows to copy/move args from one field to another.

This PR takes inspiration from #2975 and would eventually supersede #3041

cc @ntziolis, @Lappihuan

Type of change

  • [x] New feature (non-breaking change which adds functionality)
  • [x] This change requires a documentation update

How Has This Been Tested?

New tests have been introduced

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
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] 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
  • [x] Any dependent changes have been merged and published in downstream modules

Further comments

I will probably add a few more tests (e.g copy/move fields for non Root Types). I also need to write the documentation, I will wait for feedback on this PR before doing this so that eventually I do this once API is fully approved.

In the meantime, all tests available are in working order and can serve as an explanation of what the transform does and how it can be used.

santino avatar Nov 17 '21 21:11 santino

⚠️ No Changeset found

Latest commit: f004305a199f2c6922d6642c13fec9376025747d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

changeset-bot[bot] avatar Nov 17 '21 21:11 changeset-bot[bot]