americanexpress / nodes

A GraphQL JVM Client - Java, Kotlin, Scala, etc.
Apache License 2.0
307 stars 70 forks source link

StackOverflowError on enum members in model #47

Closed mkalen closed 5 years ago

mkalen commented 5 years ago

If a model contains one or more enum members, GraphQLRequestEntity will loop in the getChildren method, resulting in java.lang.StackOverflowError. Only happens if the enum has at least two contant values.

chemdrew commented 5 years ago

Great catch, thanks for finding this and supplying the fix as well!