How can I use a collection with the method graphQLResponse.dataAsObject? #163
-
Hi all, I'm struggling to use the method The below sentence fails on compilation time with the error Only classes are allowed on the left-hand side of a class literal: Note that my generated classes are Kotlin. I've tried multiple variations, but I cannot make it work. Any hint on what is going on and how to make it work? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Use the val listOfSubmittedBy: List<String> = graphQLResponse.extractValueAsObject("submitReview.edges[*].node.submittedBy", object: TypeRef<List<String>>() {}) |
Beta Was this translation helpful? Give feedback.
Use the
extractValueAsObject(path: String, typeRef: TypeRef<T>)
version.For example: