Skip to content

How can I use a collection with the method graphQLResponse.dataAsObject? #163

Answered by paulbakker
jmbarroso asked this question in Q&A
Discussion options

You must be logged in to vote

Use the extractValueAsObject(path: String, typeRef: TypeRef<T>) version.
For example:

 val listOfSubmittedBy: List<String> = graphQLResponse.extractValueAsObject("submitReview.edges[*].node.submittedBy", object: TypeRef<List<String>>() {})

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@paulbakker
Comment options

@jmbarroso
Comment options

@paulbakker
Comment options

Answer selected by jmbarroso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants