A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/graphql-dotnet/graphql-dotnet/issues/3105 below:

allow case-insensitive parsing of enumeration values · Issue #3105 · graphql-dotnet/graphql-dotnet · GitHub

Summary

When using enumeration values in mutation arguments, I want to have an option to configure, if the value is parsed case-sensitive or case-insensitive.
(I prefer case-insensitive).

This behavior seems to have changed with v5.
After upgrading to 5.1.1 (from 4.7.1), my integration tests failed because of that.

Basic example

Given this enum for example:
public enum LengthSystem { Metric = 0, Imperial = 1, }

I want to change that enum value via a mutation, by passing the new value as a variable in the request.
I want to make it work, even if the value is written "imperial" or "Imperial".

At the moment (v5.1.1), the mutation only works if the value is exactly "IMPERIAL".

Motivation

To prevent typos or hard-to-find bugs. Just want to make things more robust for the caller of my GraphQL API.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4