Input argument with enum array "sex: [Sex!] = null"
input FilterBy {
field: String!
value: String!
sex: [Sex!] = null
}
Test:
public void TestComplexListEnumArg()
{
TestClient client = new TestClient();
QueryRequest query = client.MakeQuery(q => new
{
Producers = q.Producers(new FilterBy { Sex = new List<Sex>() { Sex.Male } }, s => new
{
s.Id,
s.LastName
}),
});
Assert.Equal($@"query BaseGraphQLClient($a0: {{ sex: [""Male""] }}) {{
Producers: producers(filter: $a0) {{
Id: id
LastName: lastName
}}
}
Result:
System.ArgumentException : Can't find GQL type for Dotnet type 'Sex'