Skip to content

Conversation

sokolowskip
Copy link
Contributor

We need to serialize enums named in the Pascal Case style to strings in the Constant Case style. As in the test, Cases.ConstantCase should serialize to CONSTANT_CASE. This configuration meets the criteria of C# and GraphQL naming standards.

GraphQL.Query.Builder allows configuring your own IQueryStringBuilder. I suggest making the QueryStringBuilder.FormatQueryParam method virtual. It will allow overriding the default behavior without code duplication.

@sokolowskip sokolowskip changed the title Allow to override the QueryStringBuilder.FormatQueryParam method Allow overrding the QueryStringBuilder.FormatQueryParam method Jan 26, 2022
@charlesdevandiere
Copy link
Owner

Thank you @sokolowskip

@charlesdevandiere charlesdevandiere merged commit 6640703 into charlesdevandiere:master Mar 15, 2022
@sokolowskip sokolowskip deleted the feature/override-format-query-param branch March 15, 2022 13:01
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