Skip to content

Allow opt-out of V16 style mutation convention formatting#9808

Merged
michaelstaib merged 2 commits into
mainfrom
mst/v15_mutation_formatting
Jun 1, 2026
Merged

Allow opt-out of V16 style mutation convention formatting#9808
michaelstaib merged 2 commits into
mainfrom
mst/v15_mutation_formatting

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 1, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an opt-out mechanism for the newer (V16-style) mutation convention name formatting by adding a “V15-style” formatting path that preserves underscores when generating convention-derived mutation type names.

Changes:

  • Renames the mutation reformatting flag on ObjectFieldConfiguration and updates the corresponding CoreFieldFlags value.
  • Updates mutation convention type-name formatting to use a V15-style formatter when the new flag is enabled.
  • Updates the relevant mutation convention test and helper mutation type to validate underscore-preserving behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/HotChocolate/Core/test/Types.Mutations.Tests/AnnotationBasedMutations.cs Updates test expectations and test helper mutation type to validate V15 underscore-preserving formatting.
src/HotChocolate/Core/src/Types/Types/Descriptors/Configurations/ObjectFieldConfiguration.cs Renames the public configuration flag and updates its documentation.
src/HotChocolate/Core/src/Types/Types/Descriptors/Configurations/CoreFieldFlags.cs Renames the internal flag enum value backing the configuration property.
src/HotChocolate/Core/src/Types.Mutations/MutationConventionTypeInterceptor.cs Adds V15-style formatting function and switches formatting based on the new flag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// V15 style which does not remove the underscores from the field name.
/// </summary>
public bool DisableMutationReformatting
public bool UseV15MutationFieldNameFormat
@michaelstaib michaelstaib merged commit 6d53610 into main Jun 1, 2026
8 of 9 checks passed
@michaelstaib michaelstaib deleted the mst/v15_mutation_formatting branch June 1, 2026 09:21
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.

2 participants