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

Test case mergetypedefs overriding existing fields #5075

Conversation

simplecommerce
Copy link
Contributor

🚨 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

These are only test cases to demonstrate a desired feature.
To have the ability to override existing fields for Types and Inputs when using mergeTypeDefs.
In my current project, I am using mergeTypeDefs in order to allow to customize existing schemas without applying modifications directly to our core.

Related # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • 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

Test Environment:

  • OS:
  • @graphql-tools/...:
  • NodeJS:

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 Feb 21, 2023

🦋 Changeset detected

Latest commit: 93cfe4a

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

This PR includes changesets to release 9 packages
Name Type
@graphql-tools/merge Minor
@graphql-tools/schema Patch
@graphql-tools/stitch Patch
graphql-tools Patch
@graphql-tools/load Patch
@graphql-tools/mock Patch
@graphql-tools/wrap Patch
federation-benchmark Patch
@graphql-tools/node-require 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

@@ -1,6 +1,6 @@
{
"name": "@graphql-tools/stitching-directives",
"version": "2.3.30",
"version": "2.3.31",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix these unrelated diffs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry I am not sure what I should do, I never did this before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry about that, had a collegue help out, it should be ok now, let me know

@jjxav jjxav force-pushed the test-case-mergetypedefs-overriding-existing branch from 13c063b to eb0f283 Compare February 28, 2023 16:35
@ardatan
Copy link
Owner

ardatan commented Feb 28, 2023

Thank you! Could you create a changeset by using yarn changeset? Then we can merge and release.

@simplecommerce
Copy link
Contributor Author

Thank you! Could you create a changeset by using yarn changeset? Then we can merge and release.

Is this ok?

Summary · Added onFieldTypeConflict option to handle manual conflicts for mergeTypeDef and reverseArguments option to select left side arguments if specified.

=== Summary of changesets ===
minor: @graphql-tools/merge

If yes, I will proceed!

@ardatan
Copy link
Owner

ardatan commented Feb 28, 2023

@simplecommerce Looks good to me! Thanks 🙏

@simplecommerce
Copy link
Contributor Author

@simplecommerce Looks good to me! Thanks 🙏

you did most of the job, thank you!

@ardatan ardatan merged commit 04e3ecb into ardatan:master Feb 28, 2023
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.

2 participants