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

enhance(typeMerging): add options #1982

Merged
merged 1 commit into from Sep 2, 2020
Merged

enhance(typeMerging): add options #1982

merged 1 commit into from Sep 2, 2020

Conversation

yaacovCR
Copy link
Collaborator

@yaacovCR yaacovCR commented Sep 1, 2020

add ability to customize how type descriptions and conflicting fields
are merged.

TODO:

  • If this PR is a new feature, reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

add ability to customize how type descriptions and conflicting fields
are merged.
@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 1, 2020

The latest changes of this PR are available as alpha in npm: 6.2.1-alpha-195069d7.0

Quickly update your package.json by running:

npx match-version @graphql-tools 6.2.1-alpha-195069d7.0

@yaacovCR yaacovCR merged commit 195069d into master Sep 2, 2020
@yaacovCR yaacovCR deleted the onDescriptionConflict branch September 2, 2020 12:40
}

export interface TypeMergingOptions {
typeDescriptionsMerger?: (candidates: Array<MergeTypeCandidate>) => string;
Copy link
Contributor

Choose a reason for hiding this comment

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

This only does type descriptions, then? Field descriptions would go through the fieldConfigMerger?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup. This could be improved further with an additional optional field description merger, but actually I'm not sure whether that would have to be instead of the field merger, or in addition, and if both are allowed, which one would operate first...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants