Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up| ★ wanayoo — archive 1999 https://github.com/graphql-java-kickstart/graphql-java-tools/issues/444 | Nouvelle recherche | Portail wanayoo |
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
I'd like to preface this by saying I am new to GraphQL and this could easily be an issue in my Query.
I have recreated the issue with unit tests here: https://github.com/jcromp/graphql-enum-error-example
mvn testshould do the trick.The query should take a list of Enum's and if no values are provided it should default to a list of ALL the possible enum values:
This works perfectly fine if I am providing the values to the query. However, when I don't provide value(s) and the default value is used, when the resolver gets the arguments from the DataFetchingEnvironment they come out as Strings and not their Enum type, this causes a
ClassCastException: class java.lang.String cannot be cast to class com.example.enumerrorexample.StatusEnumIf this is me not understanding something could someone please let me know what I am doing wrong.
Thanks.